Regex to pull data from invokte-webrequest

Hello, I have a simple invoke-webrequest command that looks like the following:

`$site = invoke-webrequest`


Which when looking at the content field returns:

>html< >body< >font size='+2'< texthere>/font< >/body< >/html<
(i added them with the inverse tags to allow them on the page...not sure how to post HTML as a string here)

I imagine I could use something like regex to grab the contents between <font and the </font> but I’m not really well versed in regex.

Is this the best method to retrieve the string between font tags? Or is there a better method?


That pretty much depends on your exact requirements and the existing data. You should start to try and when you get stuck you should post your code here and we will try to help you as good as it’s get.

As posted in the very first post on top of the list of posts in this forum (Read Me Before Posting! You’ll be Glad You Did!) You can’t paste HTML or XML. Ever. Use a Gist instead or it won’t show up in your post.