get regex string pattern from regex object

aman via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 23 02:02:45 PDT 2016


How can I get the string regex pattern from a regex object?
I tried this and obviously didn't work.

my expected output would be "hello hi".i.e. the string used to 
create the regex in the first place.

static rx = ctRegex!`hello hi`;
void main()
{
     writeln(to!(string)(rx));
}


More information about the Digitalmars-d mailing list