ctRegex with variable?
Jesse Phillips via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Apr 13 11:32:51 PDT 2017
On Wednesday, 12 April 2017 at 21:25:40 UTC, Jethro wrote:
> Can regex's have variables in them? I'd like to create a
> ctRegex but match on runtime strings that are known at runtime.
>
> e.g.,
>
> auto c = ctRegex~("x{var}")
As mentioned by Ali, benchmark for your use case.
If var has common values (e.g. 1-1000). generate a ctRegex table
for those values and use runtime for any that aren't in the table.
More information about the Digitalmars-d-learn
mailing list