Regex match string conditions -
since i'm not @ regex how can match conditions in string, staticstring_1number:1number:more 1number
.
example:
string_3:0:12344555 - match string_s:0:12344555 - no match string_3:s:12344555 - no match string_3:0:123s4555 - no match
thanks.
if understand pattern staticstring_1number:1number:more 1number
correctly regex match against such strings following:
'^[a-za-z]+_[0-9]:[0-9]:[0-9]+$'
or if environment support character classes:
'^\w+_\d:\d:\d+$'
Comments
Post a Comment