Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^2: Regular Expression - delimiter/spaces problemby demichi (Beadle) |
on Feb 15, 2014 at 11:16 UTC ( [id://1075039]=note: print w/replies, xml ) | Need Help?? |
Thanks a lot for your solution. I tried and it worked fine.
I have questions regarding the dash_or_digit reg.
my $dash_or_digits = qr{ (?: - | \d+ ) }msx
Why are using (?:)? I never used this expression before and checked http://perldoc.perl.org/perlreref.html but it is not clear why use it.
I tried it without and it worked also:
my $dash_or_digits = qr{ - | \d+ }msx
Can you please let me know the reason?
Thank you.
regards
deMichi
In Section
Seekers of Perl Wisdom
|
|