Check this awesome online web 2.0 application for regular expressions: http://www.regexplanet.com
In particular I am testing this regex: [0-9]{1,7}(\.[0-9]{1,2})*
It is a bank format number, and works great
I have tried inside the model rules each of these (unsuccessfully)
‘pattern’ => ‘/[0-9]{1,7}(\\.[0-9]{1,2})*$/’
‘pattern’ => ‘[0-9]{1,7}(\\.[0-9]{1,2})*$’
‘pattern’ => ‘/[0-9]{1,7}(\\.[0-9]{1,2})*/’
‘pattern’ => ‘[0-9]{1,7}(\\.[0-9]{1,2})*’
‘pattern’ => ‘/[0-9]{1,7}(\.[0-9]{1,2})*$/’
‘pattern’ => ‘/[0-9]{1,7}(\.[0-9]{1,2})*/’
‘pattern’ => ‘[0-9]{1,7}(\.[0-9]{1,2})*’
The bottom line is that a reference for regular expressions in Yii is needed yesterday.
Is there a cheatsheet or something like that for regular expressions?
And finally do you have the answer for the specific regular expression
I am at the point where 123.123 is valid, which it shouldn’t !
Thank everyone, and also thanks for the feedback on my previous topics. I’ll try to seed back