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

Re: Re: japhy blabs about regexes (again)

by japhy (Canon)
on Jul 17, 2001 at 18:45 UTC ( [id://97329]=note: print w/replies, xml ) Need Help??


in reply to Re: japhy blabs about regexes (again)
in thread japhy blabs about regexes (again)

The problem isn't leading spaces. Leading spaces are terribly easy: ^\s+ says "find the beginning of the string and one or more spaces". It's trailing spaces that are hideous. Instead of \s+$ meaning "find the end of the string, and one or more spaces before it", it means "find one or more spaces, and then try for the end of the string". That's sad of it.

_____________________________________________________
Jeff japhy Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

  • Comment on Re: Re: japhy blabs about regexes (again)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2025-04-23 01:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.