I know this is an old post but... I think I'm taking the same course and have bumped up against this same issue.
So.. the whole string looked like this....
- match: '(<)((?i:script))\b(?![^>]/>)(?![^>](?i:type.?=.?text/((?!(java|paper)script).*)))'
This did the trick for me.