"Extract text sequences from strings" software allows users to extract delimited text sequences from strings quickly and easily. With this software, you can extract text sequences from a variety of formats with just a few clicks, saving time and simplifying the data extraction process.
To get started, you can import the subroutines you need using the "use Text::Balanced" statement, and then call the relevant functions, such as extract_delimited, extract_bracketed, extract_quotelike, extract_codeblock, extract_variable, extract_tagged, and extract_multiple.
For instance, you can use extract_delimited to extract the initial substring of $text that is delimited by two (unescaped) instances of the first character in $delim. Similarly, you can use extract_bracketed to extract the initial substring of $text that is bracketed with a delimiter(s) specified by $delim, with support for '(){}[]'. extract_tagged can extract the initial substring of $text that is bounded by an XML tag, while extract_quotelike can extract the initial substring of $text that represents a Perl "quote or quote-like operation."
Moreover, extract_codeblock can extract the initial substring of $text that represents a block of Perl code, bracketed by any of character(s) specified by $delim. extract_multiple can extract the initial substrings of $text that would be extracted by one or more sequential applications of the specified functions or regular expressions.
There are also utility functions available, such as gen_delimited_pat, which can create a string representing an optimized pattern (a la Friedl) that matches a substring delimited by any of the specified characters. And gen_extract_tagged can generate a reference to an anonymous sub that is just like extract_tagged but pre-compiled and optimized for a specific pair of tags, and consequently much faster (i.e. 3 times faster).
It's worth noting that the extract_... subroutines can be used to extract a delimited substring after skipping a specified prefix string. By default, that prefix is optional whitespace (/s*/), but developers can change it to whatever they wish. However, the substring to be extracted must appear at the current pos location of the string's variable (or at index zero, if no pos position is defined). In other words, the extract_... subroutines extract an occurrence of the substring appearing immediately at the current matching position in the string (like a G-anchored regex would).
Version 2.0.0: N/A