papi-web-org / papi-web

Papi-web
7 stars 3 forks source link

Use more clear and efficient Regular Expression matching #3

Closed Amaras closed 1 year ago

Amaras commented 1 year ago

Here, I used raw-string to avoid the \\ escaping problem. Furthermore, all patterns that are matched against on a loop are compiled out inside the same function. This could be extended further to compile the patterns as module-level constants (TBD)