Are there differences between /\((.*)\)/ and /\(([^\)]*)\)/?
In particular, would the second regular expression match a line ending, while the first one would not?
Are there differences between /\((.*)\)/ and /\(([^\)]*)\)/ ? In particular, would the second regular
Share
Yes, AFAIK the dot does not match newlines in most regex engines without a modifier.
EDIT: Apparently JS doesn’t even have that option. I personally think negated character classes are the way to go; I barely use the dot in regex.