php - preg_split() help, properly formatted regular expression -
I am very weak in regular expressions
I want to split these letters on:
preg_split ('/ \ + | - | \ | | _ /', $ string], .. I suspect this is not correct - I like some advice on the "+" sign.
< Code> preg_split ('/ [+ \ s _-] /', $ string); should work for you Unlike the squares, the characters are creating a character square.
Note - It is sometimes important that - , So I keep it always kept safe.
Comments
Post a Comment