101
rated 0 times
[
105]
[
4]
/ answers: 1 / hits: 29465
/ 15 Years ago, tue, may 19, 2009, 12:00:00
I've got a situation where I want to get a regexp from the user and run it against a few thousand input strings. In the manual I found that the RegExp
object has a .compile()
method which is used to speed things up ins such cases. But why do I have to pass the regexp string to it again if I already passed them in the constructor? Perhaps constructor does the compile()
itself?
More From » regex