Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^4: pcre regex

by Anonymous Monk
on Apr 06, 2012 at 11:36 UTC ( #963816=note: print w/ replies, xml ) Need Help??

in reply to Re^3: pcre regex
in thread pcre regex

I substituted and changed ^ and $ but still not getting matches


Comment on Re^4: pcre regex
Download Code
Replies are listed 'Best First'.
Re^5: pcre regex
by moritz (Cardinal) on Apr 06, 2012 at 11:40 UTC

    What do you think (?<=) and (?=) do? Why did you write them?

    The regex you wrote matches a string like 4444B within a longer substring, so maybe you're doing something else wrong.

Re^5: pcre regex
by bart (Canon) on Apr 06, 2012 at 12:00 UTC
    This might do what yo uwant:
    The \b restricts the matches to word boundaries, so it won't report matches in the middle of a longer "word" (which may include digits), like "123456789ABCD".

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2016-02-11 05:14 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (359 votes), past polls