Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by BrowserUk (Patriarch)
on Jan 14, 2013 at 14:01 UTC ( [id://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.

Replies are listed 'Best First'.
Re^2: Regex: Char-class equivalent for [^]
by LanX (Saint) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1013216]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-20 01:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found