Matching two strings, one with slight variation
i'm trying to match two strings with a single regex. they are both very similar; the difference being an additional ten character sequence added in the second one (being iu503CsuD4 in this example):
to match them i have these two regular expressions, respectively:
is there a way to combine those expressions to match both strings? i was trying to use the "?" operator on the second expression to make the additional ten character sequence optional, but it doesn't work.
all responses will be appreciated.
Not 100% positive,but try this:
The difference is that since the third 'phrase' in
is 10 chars also (1278481805), so what I thought to do is first look for a char that's not a digit and then grab 9 numbers afterward and make that optional.
I'm not sure if it'll work, but it's worth a shot.
cali, that unfortunately won't be good; the 10 character sequence does not always start with a letter. i'm also sure that the earlier 10 character sequence of pure numbers will not interfere with the 10 character mixed sequence of letters and numbers.
thank you, though! if you're struck by anything else, do let me read it.