I have a regular expression that I am trying to match on strings containing:
<script type="text/javascript">
var debug = new Debugger();
</script>
I have determined it suffices to use the word "debug" to match on.
If I execute the command:
find . -name 'test.html' -exec perl -ne '/<script type="text\/javascript">[\S\s]*?(debug)[\S\s]*?<\/script>/ && print' '{}' \;
I would expect the regex to match, as the regex string
<script type="text\/javascript">[\S\s]*?(debug)[\S\s]*?<\/script>
Matches on sublime text.
I have had trouble using [\S\s] with Perl. Is there something I am missing here?
Thanks