(of course 'AAAAA' and 'BBBBB" represent text)$str = "AAAAA_BBBB" ; #or $str1 = "AAAAA" ($part1, $part2) = ($str =~ /^(\w+)_(\w+)$/ ) ; # works fine ($part1, $part2) = ($str1 =~ /^(\w+)[_(\w+)]$/ ) ; # NOPE
In reply to simple regexp problem by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |