A
Alexandra
Hello All-
I'm attempting to extract a substring of characters from an alphanumeric
text string. I've read a lot of Perl documentation on the 'index' and
'substring' functions; however, I cannot find a regular expression (or an
example of one) that is the equivalent of a "between" function in Perl. Perl
is very good at string manipulation so I assume there must be a way to do
this. Here's what I'm trying to do:
$mystring = 'aaa @ bbbb @ c @ dd @ eeeeee @ FFFFF=xxxx @ ggg @ h'
The goal is to extract the 'xxxx' substring between the '=' sign and the
next whitespace character. (There is no fixed length for the 'xxxx'
substring.)
Rather than use a series of clunky index and substring calls, does anyone
have a better suggestion? If anyone can recommend a good Perl language
reference website (or book) that has some excellent examples of regular
expressions, that would be helpful too.
Thanks in advance,
Alexandra
I'm attempting to extract a substring of characters from an alphanumeric
text string. I've read a lot of Perl documentation on the 'index' and
'substring' functions; however, I cannot find a regular expression (or an
example of one) that is the equivalent of a "between" function in Perl. Perl
is very good at string manipulation so I assume there must be a way to do
this. Here's what I'm trying to do:
$mystring = 'aaa @ bbbb @ c @ dd @ eeeeee @ FFFFF=xxxx @ ggg @ h'
The goal is to extract the 'xxxx' substring between the '=' sign and the
next whitespace character. (There is no fixed length for the 'xxxx'
substring.)
Rather than use a series of clunky index and substring calls, does anyone
have a better suggestion? If anyone can recommend a good Perl language
reference website (or book) that has some excellent examples of regular
expressions, that would be helpful too.
Thanks in advance,
Alexandra