We have a regexp
Does it match anything in the string
Java? In the string
Answers: no, yes.
In the script
Javait doesn’t match anything, because
[^script]means “any character except given ones”. So the regexp looks for
"Java"followed by one such symbol, but there’s a string end, no symbols after it.
Yes, because the regexp is case-insensitive, the
[^script]part matches the character