Checks if two RegExp objects are the same.
RegExp
The first value to compare.
The reference RegExp.
true if the regular expressions are the same, false otherwise.
true
false
if ref is not a RegExp.
ref
Checks if two
RegExpobjects are the same.