ABC1D A1D
Say I want to match the following regex: A(BC|)(.*)D which will match either AD.*D or ABC.*D. Now I have the following code:how can i make it not print BC and only print the numbers? Thanx a lot in advance.@matches = ($_ =~ /A(BC|)D/g) if(@matches != 0){ foreach(@matches){ print "$_.\n"; } } } the code prints 1 BC 1
In reply to how to make // not return what is in a parenthesis? by beanryu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |