neversaint has asked for the wisdom of the Perl Monks concerning the following question:
Dear Masters,
Given these strings:
Given these strings:
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
---
neversaint and everlastingly indebted.......
neversaint and everlastingly indebted.......
Back to
Seekers of Perl Wisdom