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

Re: Substitute \W but not \.

by hipowls (Curate)
on Mar 12, 2008 at 20:54 UTC ( [id://673824]=note: print w/replies, xml ) Need Help??


in reply to Substitute \W but not \.

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^2: Substitute \W but not \.
by samtregar (Abbot) on Mar 12, 2008 at 21:43 UTC
    Epic fail. Don't use a code-block where a character-class will do!

    -sam

Re^2: Substitute \W but not \.
by ikegami (Patriarch) on Mar 13, 2008 at 02:45 UTC
    Even if you didn't think of /[^\w.]/, /(?!\.)\W/ would be better, and /\W(?<!\.)/ probably better yet.

      I completely agree, I did think of /[^\w.]/ but there are many ways to skin this cat and I was showing one of the uglier methods I had just discovered while poking about in the murkier corners.

      As I said in my update, in future I'll be clear when a post isn't intended as a solution to the problem at hand. It was meant as an interesting (to me at least) digression and I apologize for giving the impression it was a serious suggestion.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-03-28 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found