Hi guys I have next text:
</form>onclick="g(null,null,'.htaccess','touch')">Touch</a> <br><br><pre class=ml1>
DirectoryIndex index.php
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</pre></div>
I try to parse all between <pre class=ml1> and </pre></div> with: –
string con = Regex.Match(content, @"<br><br><pre class=ml1>(.*?)</pre></div>", RegexOptions.Multiline).Groups[1].Value;`
But it doesn’t work. Why?
You need
so the
.matches every character including newlines.You don’t need
RegexOptions.Multilineas you’re not using^or$. (Multiline mode makes them match the beginning and end of a line, instead of the beginning and end of the input string.)