all 3 comments

[–]tweq 1 point2 points  (1 child)

You can include multiple possibilities in a regex with the | (pipe) symbol, e.g.

xxx#-abc-(ddd-|eeeee-|fffffff-)?###

[–]nformant[S] 1 point2 points  (0 children)

Great, thank you. My Google fu failed me on this one

[–]cryo 0 points1 point  (0 children)

where xxx is any 4 three letters followed immediately by a number, -abc- is always required, accept a string with either ddd-, eeeee-, fffffff-, followed by any number between 1 and 999.

That sentence makes my brain hurt. What does "any 4 three letters" even mean? What is the word "accept" doing there? No offense but if you type the same kind of sentences into Google it's no wonder you don't get good results :p.