functional with sre2 replacing regexp