Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
"be consistent"
 
PerlMonks  

Re: Regex: Char-class equivalent for [^]

by BrowserUk (Pope)
on Jan 14, 2013 at 14:01 UTC ( #1013216=note: print w/ replies, xml ) Need Help??


in reply to Regex: Char-class equivalent for [^]

How about one of these?

"the quick brown fox\njumps over the lazy dog" =~ m[([\W\w]+)] and pri +nt $1;; the quick brown fox jumps over the lazy dog "the quick brown fox\njumps over the lazy dog" =~ m[([\S\s]+)] and pri +nt $1;; the quick brown fox jumps over the lazy dog "the quick brown fox\njumps over the lazy dog" =~ m[([\D\d]+)] and pri +nt $1;; the quick brown fox jumps over the lazy dog

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: Regex: Char-class equivalent for [^]
Download Code
Re^2: Regex: Char-class equivalent for [^]
by LanX (Abbot) on Jan 14, 2013 at 14:08 UTC
    Hmm, bundling complementary char-classes is a clever idea!

    thx! :)

    Cheers Rolf

    UPDATE: and works equally in both languages!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013216]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (13)
As of 2014-04-21 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls