I want to use regex in c# to match certain contents.
For example, the input string would be the following:
7687687toyi7fy
<body style="box-sizing: border-box; height: inherit; width: inherit;
margin: 0px; overflow: hidden">
lkjlknkjyyugtfiytfif
</body>
</html>
Now I want to match whatever between <body ... hidden>
and </body>
So for the above example, I would want to match "lkjlknkjyyugtfiytfif"
I tried using the pattern <body(.+?)>(.+?)</body>
but somehow it does not match anything.
For debugging, I also tried using <body(.+?)>
, it matches the <body ... hidden>
successfully, but then whatever I add after <body(.+?)>
, I can not get what I want.
Any suggestion would be appreciated.
Thanks!