I need to be able to match a price value from a string given the string starts with Shipping (UK):</span>
string
Shipping (UK):</span>£2.95
regex so far
(?<=\):<\/span>).*
I have tried to do something like this…
(?<=\Shipping (UK):<\/span>).*
but this does not work, what is the right way to construct this regular expression?
You need to escape the parenthesis in your current regex to get it to match:
Also, Charmander is correct, you don’t want the shorthand
\S, you want justS.