4
Could anyone tell me why this regular error expression in PHP?
/:[^\/\\]*/
She’s being used this way:
return '/' . preg_replace('/:[^\/\\]*/', '([^\/]*)', $value) . '/';
I am trying to "break" one against bar with another but PHP behaves as if breaking the "]" character and returns the error: "Compilation failed: Missing terminating ] for Character class".
There is another way for me to specify a literal counter bar in a regular PHP expression?
Escape the backslash
/:[^\\/\\\\]*/
– HwapX