in reply to pcre regex

The ^ and $ around the regex mean that it only matches a whole string. If you want to search for matches inside a string, leave out those anchors.

See perlretut for more details.

Replies are listed 'Best First'.
Re^2: pcre regex
by Anonymous Monk on Apr 06, 2012 at 10:56 UTC

    how do i substitute ^ and $ in my regex

      Well, what semantics do you want?

      If you just want to remove the restriction that the regex has to match the whole string, remove them.

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

        (?<=)\d{4}[A-Z0-9](?=)