I have written this below Regex to capture the description data but checking the output I could see the below info

Hello,

I have written this below Regex to capture the description data but checking the output I could see the below info
EX:
meta name=“description” content=“Welcome Home With premium finishes and wide-open spaces, each floor plan from Vintage Pointe Apartments in Las Vegas brings you unparalleled luxury without sacrificing on comfort. Vintage Pointe is…”>

Regex Used: <meta\sname=“description”\scontent=“(.*)”

Output: meta name=“description” content=“Welcome Home With premium finishes and wide-open spaces, each floor plan from Vintage Pointe Apartments in Las Vegas brings you unparalleled luxury without sacrificing on comfort. Vintage Pointe is…”

Excepted Output: Welcome Home With premium finishes and wide-open spaces, each floor plan from Vintage Pointe Apartments in Las Vegas brings you unparalleled luxury without sacrificing on comfort. Vintage Pointe is…

Can any one help me with this?

1 Like

Hi

U are almost done

Your output comes with Groups instead of matches
So once u get your matches output as a variable mention like this to get the group value

matchOutput(0).Groups(0).Value

Cheers @deepankar

Hi,

Used the same expression but still this is showing the same output

Thanks

1 Like

Fine
Let’s take a simple expression

(?<=content=\W).*

Hope this would help you
@deepankarh

Hi @deepankar ,

Maybe you could try with the below Expression :

(?<=content="").*?(?="">)

Regex.Match(yourStringVar,"(?<=content="").*?(?="">)").Value.ToString

You would also have to import the namespace System.Text.RegularExpressions to use the above Expression.