4 ms·
You don't have to compile and store regexes in python. re.match(pattern, string) can be used right away and it will internally cache the compiled version of you
by Too 11y ago
You don't have to compile and store regexes in python. re.match(pattern, string) can be used right away and it will internally cache the compiled version of your most recently used patterns.
I'm also curious in which type of application regex is so important that it will be a deciding factor of language choice. I mean, if you have a regex in one out of 100 files, does it really matter if you have to write 2 lines instead of one.