0

From this string:

<strong class="big zindex-pt zindex-pt-all">&pound;2,362,214</strong>

I am trying to get &pound;2,362,214 using this Regex in Excel VBA:

 .Pattern = "<strong class="big zindex-pt zindex-pt-all">([\s\S]*?)<"

Any ideas what I am doing wrong?

Community
  • 1
  • 1
JoaMika
  • 1,727
  • 6
  • 32
  • 61

2 Answers2

1

Escape double quotes inside regex: " to ""

Jahid
  • 21,542
  • 10
  • 90
  • 108
0

ok thanks. Actually this works for me:

.Pattern = "<strong class=""big zindex-pt zindex-pt-all"">([\s\S]*?)<"
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
JoaMika
  • 1,727
  • 6
  • 32
  • 61
  • `\S` matches anything that is not `\s` and both of them combined matches anything at all – Jahid Jun 16 '15 at 23:31