Reputation: 2643
Hi there I need a hand with the pattern below:
(?<=\")([0-9\.\/])+(?=\")
Content
<ul>
<li><a href="../">..</a></li>
<li><a href="1.0/">1.0/</a></li>
<li><a href="1.1/">1.1/</a></li>
<li><a href="1.23/">1.23/</a></li>
</ul>
The above pattern selects ../, 1.0/, 1.1/, 1.23/
I don't want to match ../
but any permutation of number,period and / should match.
Give me a hand please.
Thanks as always.
Upvotes: 4
Views: 1538
Reputation: 1987
I modify your regex with adding negative lookahead ( (?!\.) ).
(?<=\")(?!\.)([0-9\.\/])+(?=\")
Upvotes: 1