Compose a regular expression from other RegExp objects

Updated . Posted . Visible to the public.

You can create a Regexp Show archive.org snapshot object from existing Regexp objects by using the interpolation syntax you know from strings:

re1 = /x/
re2 = /a#{re1}b/
'aaxbb' =~ re2 # => 1
Henning Koch
Last edit
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2011-09-07 11:36)