in reply to Re: Using Regexp::Common
in thread Using Regexp::Common
Ya from your example it is clear that something is wrong with the -keep option. I am going to ditch this module altogether.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using Regexp::Common
by AnomalousMonk (Archbishop) on Sep 19, 2015 at 16:13 UTC | |
I wanted to extract all the numbers from a string that may be separated by any delimiter. I don't understand what "separation by any delimiter" means. I am going to ditch [Regexp::Common] altogether. I think that would be rash. Regexp::Common and number, the extension I think you need, are designed to do many things and are correspondingly complicated, but will, I think, repay effort invested to understand them. (Update: And I think the -keep option just needs more study.) I'm still not sure exactly what you require, but here's a sample of code that may be near the ballpark. File: Output:
Give a man a fish: <%-{-{-{-< | [reply] [d/l] [select] |
|
Re^3: Using Regexp::Common
by AnomalousMonk (Archbishop) on Sep 19, 2015 at 22:36 UTC | |
Ok, the penny finally dropped for the -sep=>',' -group=>3 stuff. Is this more like what you're after? (This still needs Perl version 5.10+.) (The 'exponential' 'real' 'integer' type classification may be a bit wobbly. Perhaps an exercise for the reader?) Give a man a fish: <%-{-{-{-< | [reply] [d/l] [select] |
by justrajdeep (Novice) on Sep 20, 2015 at 11:36 UTC | |
| [reply] |