in reply to requesting small regex
As you probably know, \d+ matches digits. You want the opposite, which conveniently, perl provides as \D. (Note als: \s&\S; \w&\W; etc. ).
So:
print for split /\D+/, "13%22%3%43";; 13 22 3 43
Note: This applies to ASCII/ISO data; once you get into the world of Unicrap, you're on your own :(
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: requesting small regex
by perl@1983 (Sexton) on May 07, 2012 at 07:28 UTC | |
Re^2: requesting small regex
by Anonymous Monk on May 07, 2012 at 07:21 UTC | |
by BrowserUk (Patriarch) on May 07, 2012 at 08:52 UTC | |
Re^2: requesting small regex
by thundergnat (Deacon) on May 07, 2012 at 18:11 UTC | |
by BrowserUk (Patriarch) on May 07, 2012 at 18:35 UTC | |
by thundergnat (Deacon) on May 07, 2012 at 19:10 UTC |