Is it possible to add a “filter” with words that IF found, the regex does not split the words? – Wow i hope my english makes sense 🙂
Let me illustrated..
This is my current regex to split strings such as: TheStringIsSItTING Together
$taglist=preg_replace('/([a-z])([A-Z])/','$1 $2', $taglist);
With the example string the regex produces: The String Is SIt TING
I would like to have a filter, where i could put in SItTING so that the regex does not split that word up.
Please let me know if my explanation was not good enough, i am battling with my english still 🙂
Oh, and thanks for a GREAT community!!
You can’t really check if you’re in the middle of a word without manually breaking apart that word with lookaround assertions as @stema has done. To have a list of exclusions, you’d have to do it a bit more programmatically.