Problems? Is your data what you think it is? | |
PerlMonks |
Help with pattern matching quantifiersby Anonymous Monk |
on Oct 24, 2016 at 17:42 UTC ( [id://1174610]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks I want to perform a pattern matching, but it seems that I have some problems capturing the desired patterns. Consider the following lines from a matrix
I want to capture every number (negative or positive), but as you can see, although the obvious separator is the space, sometimes the numbers are next to each other. I tried this:
because I thought the \s{0,5} means match space 0 up to 5 times, but it doesn't work... Can you help me fix this?
Back to
Seekers of Perl Wisdom
|
|