I
Ioannis Vranos
Given the regular expression:
S"^([a-zA-Z]+|[a-zA-z]+\\s[a-zA-Z]+)$"
1) Isn't the "[a-zA-Z]+|[a-zA-z]+" part redundant? As far as I can
understand it means exactly the same as "[a-zA-Z]+" alone.
2) Isn't the parenthesis grouping redundant?
3) How can we define the parenthesis characters themselves as expected
characters in a match?
Thanks in advance.
S"^([a-zA-Z]+|[a-zA-z]+\\s[a-zA-Z]+)$"
1) Isn't the "[a-zA-Z]+|[a-zA-z]+" part redundant? As far as I can
understand it means exactly the same as "[a-zA-Z]+" alone.
2) Isn't the parenthesis grouping redundant?
3) How can we define the parenthesis characters themselves as expected
characters in a match?
Thanks in advance.