Beefy Boxes and Bandwidth Generously Provided by pair Networks
"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
Replies are listed 'Best First'.
Re^2: Regex: Char-class equivalent for [^]
by LanX (Canon) 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 romping around the Monastery: (12)
As of 2015-07-31 10:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls