Trying to find regex for this question :

[PHP parsing xml file error](https://stackoverflow.com/questions/13447793/php-parsing-xml-file-error#13447793)

Trying to match "137b" in the following string , using negative lookahead and lookbehind assertions :

```
<Rate Symbol="EURTRY">
    <Bid>2.29443</Bid>
    <Ask>2.29562</Ask>
    <High>2.29841</High>
    <Low>2.28999</Low>

 137b

 <Direction>1</Direction>
    <Last>23:29:11</Last>
</Rate>

```

Can anyone please point out why this regex is not working :

```
(?<!(<\w+>))[a-zA-Z0-9_\.:]+(?!(</\w+>))

```

Intention : A string containing "a-zA-Z0-9\_.:" not preceded and followed by an XML tag, so it should have matched "137b" , but it does not.

Here is a link to the regex :
<http://regexr.com?32rk4>

Whereas the same regex `(<\w+>)[a-zA-Z0-9_\.:]+(</\w+>)` without negative assertions correctly matches all the strings WITHIN xml tags.

<http://regexr.com?32rk7>