http://www.roscripts.com/PHP_regular_expressions_examples-136.html

<http://www.roscripts.com/PHP_regular_expressions_examples-136.html>e.g.

//Quotes: Replace smart double quotes with straight double quotes.
//Unicode version for use with Unicode regex engines.
preg_replace('[\u201C\u201D\u201E\u201F\u2033\u2036]', '"', $text);


Regards,
Saša Stamenković


On Mon, Nov 9, 2009 at 1:25 PM, Stefan Sturm
<[email protected]>wrote:

> Hello,
>
> I have a field in a Zend_Form with a regex validator like this::
>
> 'Regex' => array(
>    'validator' => 'Regex',
>    'breakChainOnFailure' => true,
>    'options' => array(
>        'pattern' => '/^.{1,10}$/',
>        'messages' => array(
>            'regexNotMatch' => 'Error for address2: regexNotMatch',
>        )
>    )
> )
>
> With this field a have some unicode problems:
> 1234567890 - is OK
> 123456789º - is not OK ( last char: Unicode: U+00BA )
>
> Here are the mbstring settings of my maschine:
> mbstring.detect_order                   no value
> mbstring.encoding_translation   On
> mbstring.func_overload          7
> mbstring.http_input                     UTF-8
> mbstring.http_output                    UTF-8
> mbstring.internal_encoding              UTF-8
> mbstring.language                       neutral
> mbstring.strict_detection               On
> mbstring.substitute_character   no value
>
> Hope somebody can help me on this.
>
> Thanks and greetings,
> Stefan Sturm
>

Reply via email to