October 23, 2016 get regex string pattern from regex object | ||||
---|---|---|---|---|
| ||||
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)); } |
Copyright © 1999-2021 by the D Language Foundation