Hello,
I have a regex which includes a list of commands. But I don't know what kind of parameter behind it is, so it can be a string or a number or nothing.
And there can be the possibility, that I don't know the command.
In my first version there wasn't any strings, so (abc|def|[a-z]+)([0-9]*)
works fine. But now I want to allow strings, too. (abc|def|[a-z]+)([0-9]*|[a-z]*)
doesn't work.
String 1: abc20def20ghi20
String 2: abcdddef20ghi20
String 3: abcdddef2d0ghi20abcdd
String 1:
Example with regex 1: abc20def20ghi20
Example with regex 2: abc20def20ghi20
String 2:
Example with regex 1: abcdddef20ghi20
Example with regex 2: abcdddef20ghi20
I want to get following result: abc20def20ghi20 and abcdddef20ghi20
Thanks for your help.