-1

I'm grab value from web page and I use this:

.Squadra = Regex.Match(Content, "<td class=""team large-link""\s*>(.+?)</td>").Groups(1).ToString
.Squadra = Remove_Tags(Regex.Match(.Squadra, ">(\w+)<\/a>").Groups(1).ToString)

you can see that .Squadra contains the grabbed link value, so in the next step i replace al link format and grab the only value inserted in the link. All working good, but if I have value like this: Real Vicenza, the variable return me blank value, probably for the space between Real and Vicenza? How to correct this? I'm trying to insert s* before (+w) but seems doesn't work.

1 Answers1

0

Instead of using (\w+) use ([^<]+) - that matches all non-< characters, which is far less likely to fail.

smathy
  • 26,283
  • 5
  • 48
  • 68