symfony/symfony — pull request #4513 by lavoiesl (2012-06-08 04:47:21+00:00)
Title: [Form][Validator] Fixed generation of HTML5 pattern attribute based on Assert\Regex to remove delimiters.

In Issue #3766, it was asked that Assert\Regex generates HTML5 pattern attribute.
It was done in PR #4077, but the generated Regex is in delimited format which is not supported by HTML5.

Hence, `/[a-z]+/` would be converted to `[a-z]+`.
However, if options are specified like in `/[a-z]+/i`, it cannot be converted and this will throw an Exception. Developer will have to convert his Regex to `/[a-zA-Z]+/`

**Note**
I haven’t been able to run PHPUnit, anyone is invited to test the code and the tests themselves.
Sorry about that.