I want to create one regex construct that can capture the desired string as stated above. However my regex below doesn't seem to do the job.my $str1 = "2L"; # want to capture 2L my $str2 = "bar.2L"; #want to capture 2L
How can I get the correct one?while(<DATA>) { /\w*\.*(\S+)/; print "$1\n"; } __DATA__ 2L bar.2L
In reply to One regex construct to handle multiple string types by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |