G
Geoff
Is there a way to concatenate regular expressions in ruby? Something
like Regexp.union but without the or between expressions.
For example say i have the following regular expressions:
Set = /[\[][1-9][\d][\]]/
Field = /[F]?[1-9][\d]*/
and i want to make a regular expression to match both of them, i'd like
to be able to do something like the following:
SetThenField = Set + /([\s])*/ + Field + /[\s]/
- Geoff
like Regexp.union but without the or between expressions.
For example say i have the following regular expressions:
Set = /[\[][1-9][\d][\]]/
Field = /[F]
and i want to make a regular expression to match both of them, i'd like
to be able to do something like the following:
SetThenField = Set + /([\s])*/ + Field + /[\s]/
- Geoff