Say I have the following string: AAABCDAAADCBAAABBDAAA
I need to extract all instances of AAA(anything)AAA, so I used the following to try and do that:
my $string = 'AAABCDAAADCBAAABBDAAA'; my @matches = $string =~ /AAA\w+AAA/g;
The only result returned is the full string, whereas I need...:
Any ideas?AAABCDAAA AAADCBAAA AAABBDAAA AAABCDAAADCBAAA AAADCBAAABBDAAA AAABCDAAADCBAAABBDAAA
In reply to Perl Pattern Matching & RegEx's by jaiieq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |