Here is a regex expression in javascript to get 60 without 1:
index.tsx17 chars2 lines
This expression will match any string that contains the number 60, but does not contain the number 1.
^
character matches the start of the string.[^1]
character class matches any character that is not the digit 1
.*
operator quantifies the preceding character class, matching zero or more characters that are not 1
.60
matches the literal sequence of 6
and 0
.[^1]*
at the end matches zero or more characters that are not 1
until the end of the string ($
sign).So this expression will match strings such as "60", "5060", "0660", "60ab", but not "16", "601", "610", "161", etc.
gistlibby LogSnag