Username with Inverted Comma

I want to allow nickname like " Dog's Boss". How to add an Inverted Comma '  in preg_match ?

I can't put it directly in preg_match( '/^[a-zA-Z0-9_. &'*-]+$/', $arg0 ), it comes out an error.

 

 


Quote · 9 Jul 2012

It's an Apostrophe

Try escaping it in the preg_match pattern.

preg_match( '/^[a-zA-Z0-9_. &\'*-]+$/', $arg0 )

https://www.deanbassett.com
Quote · 9 Jul 2012

 

It's an Apostrophe

Try escaping it in the preg_match pattern.

preg_match( '/^[a-zA-Z0-9_. &\'*-]+$/', $arg0 )

 It works, Thank you!

Quote · 9 Jul 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.