It's not mentioned in the help file that you must use the /g modifier so as to get the total number of matches. Instead, the help says that, the identifiers $regex and $regsub returns the numbers of matches. I think that's false and should be modified and said to return only 0 or 1 by default and returns the number of matches only if the modifier /g is included.

Personally, this doesn't bother me. It's just that for regular expression beginners, this could be misunderstanding. And also, the statements are false.

frown


tropnul