Support custom functions for groups in subf/subfn

Create issue
Issue #283 wontfix
Former user created an issue

for example:

subf('abc', '{0}', _0=lambda x: x.upper()) or subf('(?P<name>abc)', '{name}', _name=lambda x: x.replace('a', 'A')) or subf('(?P<name>abc)', '{name.capital}', capital=lambda x: x.capital())

Comments (2)

  1. Matthew Barnett repo owner

    It's not clear what you want, and, anyway, you can pass a function as the replacement to do anything beyond the basics that a replacement string provides.

  2. Log in to comment