Gives a set of regular expressions r_1, r_2, r_3, ..., r_n is there a regular expression which could be interpreted to say something similar to:
- match any permutation of r_1, r_2, r_3, ..., r_n
- match all of the following in any order: r_1, r_2, r_3, ..., r_n
The regular expression a|b|c
...
- matches the letter
a
- matches the letter
b
- does not match the entire string
cab
. The regex will only align with exactly one letter fromcab
For a given example, I could write down each and every permutation. The following is rather verbose:
ABC|BAC|CAB|ACB|BCA|CBA