php - Compilation failed: unknown property name after \P or \p -


hi want match string: "\par hello \par world"

against regexp pattern -> \\par

however, compilation failed: unknown property name after \p or \p

i believe regexp rule treated unicode character property. how escape , run pattern is?

i including in pdo function so.

function sqlite_regexp($sql,$db) {     if($db->sqlitecreatefunction("regexp", "preg_match", 2) === false) exit("failed creating function!");     if($res = $db->query($sql)->fetchall()){ return $res; }     else return false; } 

i calling function so

sqlite_regexp("select count(*) table regexp('/\\par/',column) ",$db) 

you need 3 backslahes \\\. check example:

$string = "\par hello \par world"; $pattern = '/\\\par/'; preg_match_all($pattern, $string, $matches);  var_dump($matches); 

you can find more info in php manual

you have updated question, see aren't using preg_match using sql regexp function. however, sql function should work \\\ well.


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -