laziness, impatience, and hubris | |
PerlMonks |
Re^2: How to match and extract string after exact 3 digits [RESOLVED]by thanos1983 (Parson) |
on Feb 10, 2017 at 11:50 UTC ( [id://1181646]=note: print w/replies, xml ) | Need Help?? |
Hello Marshall, This is very interesting, but while I was testing my code last night I updated with a bit more complex data. Sample of new update more complicated data:
With the regex that you provided works perfect without the new string. I am really bad with regex so I can not really tell why. I think because it matches the first string that it founds and at the end of the string it stops. In my case I need also to be able to detect white space characters in the string. So I need from the regex to detect the string between two integers with 3 digits each, but that also will be a problem due to the last integer at the end of the string that has no integers following. My temporary solution is:
After that I need to clear the array elements for empty elements and remove trailing and leading white space. But apart from that it seems to be working fine. Never the less the solution is really good idea but for the moment it does not work with my current problem. Thank you for your time and effort though.
Seeking for Perl wisdom...on the process of learning...not there...yet!
In Section
Seekers of Perl Wisdom
|
|