hoaproject / Core

The Hoa\Core library.

Home Page:https://hoa-project.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support \U, \u, \L, \l, \E and \e in the zFormat

Hywan opened this issue · comments

Please, see point 5 of http://php.net/reference.pcre.pattern.differences. Consequently, we are not able to write something like: s/-(.)/\u\1/ to transform foo-bar into fooBar. We have to implement it by ourselves.

  • \U,
  • \u,
  • \L,
  • \l,
  • \E,
  • \e.

Two locations: either in the zFormat or in Hoa\Regex (we would create a new “preg_replace”-like implementation). I would go for Hoa\Regex but it will create a dependency between Hoa\Core and Hoa\Regex which must not happen (in this way). However, supporting it in all regular expressions used in Hoa would be great… So I propose to (1) implement it in the zFormat, and then (2) in Hoa\Regex.

Thoughts?

Needed to continue #56 (comment).

This issue was moved to hoaproject/Cli#13