bookmark

Multi-regex: single pass replace of multiple regexes (Python recipe)


Описание

All regexes first get combined into a single big disjunction. Then, for each match, the matching sub-regex is determined from a group name and the match object dispatched to a corresponding method, or simply replaced by a string.

тэги

Пользователи данного ресурса

  • @victoria_helen

Комментарии и рецензии