Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^3: utf weirdness in regex

by hbo (Monk)
on Jul 24, 2004 at 05:52 UTC ( #377090=note: print w/ replies, xml ) Need Help??

in reply to Re^2: utf weirdness in regex
in thread utf weirdness in regex

But the period matches any character if it isn't escaped.

/[\w\s\.]+/ # one or more word, space or period characters /[\w\s.]+/ # one or more word. space or *any* characters /.+/ # same as above
"Even if you are on the right track, you'll get run over if you just sit there." - Will Rogers

Comment on Re^3: utf weirdness in regex
Download Code
Replies are listed 'Best First'.
Re^4: utf weirdness in regex
by kelan (Deacon) on Jul 26, 2004 at 21:12 UTC

    Note that inside a character class, a period is not special: it means just period. So this:

    would match one or more of (word chars, space chars, periods) in any combination.

    In other words, your first two examples are equivalent, not your second two.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2015-12-02 01:31 GMT
Find Nodes?
    Voting Booth?

    My keyboard shows this many letters:

    Results (31 votes), past polls