Friday, 6 September 2013

What is the equivalent of square brackets for multiple characters?

What is the equivalent of square brackets for multiple characters?

Regex [abcd] can take any one character out of a, b, c and d.
What if I want to take any one string out of abc, def and ijk.
So something like ["abcd" "def" "efg"] (but this obviously doesn't work).
How would I do this in Java?

No comments:

Post a Comment