Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

RE: RE: Re: It seems simple...

by plaid (Chaplain)
on Feb 24, 2000 at 11:42 UTC ( [id://3973]=note: print w/replies, xml ) Need Help??


in reply to RE: Re: It seems simple...
in thread It seems simple...

Sorry, I misread your question the first time (me having posted the first answer).. I think what you want is $string =~ s/[^\w\s]//g;

Replies are listed 'Best First'.
RE: RE: RE: Re: It seems simple...
by Xavier (Novice) on Feb 24, 2000 at 11:54 UTC
    Cool, that works. Thanks. The question now, though, is why? I know that: /^\w/ will match any word character at the start of a line and that /[]/ is character class stuff. Does the ^ actually negate or something similar instead of match the start of a line (in this context, of course)?
RE: RE: RE: Re: It seems simple...
by Xavier (Novice) on Feb 24, 2000 at 12:06 UTC
    Now that I know what to look for, I finally found the explanation in man perlre . Ah, well. someday i'll read that in its entirerty.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-23 22:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found