H
Henrik Dahl
Hello!
In my application I have a need for using a regular expression now and then.
Often the same regular expression must be used multiple times. For
performance reasons I use the RegexOptions.Compiled when I instantiate it.
It must be obvious that it takes some time to instantiate such an object.
My question is, does the Regex instantiation somehow deal with some caching
internally so instantiating a Regex object multiple times having the same
expression as the first argument for the constructor is quite efficient or
do I need to create my own caching functionality?
Best regards,
Henrik Dahl
In my application I have a need for using a regular expression now and then.
Often the same regular expression must be used multiple times. For
performance reasons I use the RegexOptions.Compiled when I instantiate it.
It must be obvious that it takes some time to instantiate such an object.
My question is, does the Regex instantiation somehow deal with some caching
internally so instantiating a Regex object multiple times having the same
expression as the first argument for the constructor is quite efficient or
do I need to create my own caching functionality?
Best regards,
Henrik Dahl