Here is the regexp: /<\?nib.+\?>/im
I'm testing it on a file like this:
<html>
<head>
<title>OPEN LARK</title>
</head>
<body>
<h1>THIS IS A HEADER
<?nib
asdf
?>
</h1>
</body>
</html>
I am getting no matches. How can I fix this?
You are using the . to match multilines. That isn't implemented in Javascript. Check this answer for a workaround.
About the workaround:
Instead of the dot, use a class and its negation to match everything. For example, replace the . with [\s\S].
because the dot (.) doesn't match newlines.
The way in javascript is to replace the dot by [\s\S]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With