Lohnt es sich Pythons re.compile zu verwenden?

Gibt es Vorteil bei der Verwendung kompilieren für reguläre Ausdrücke in Python?

h = re.compile('hello')
h.match('hello world')

vs

re.match('hello', 'hello world')

InformationsquelleAutor der Frage Mat | 2009-01-16

Schreibe einen Kommentar