How to get a particular part of a string? e.g after some special characters or some words.
1 Answer
Use the PHPStringFun add-on and use regX either with substr or str_replace. Alternatively you could use Low Replace or MX Jumper. Or you could even activate PHP on the template and post parse. All depends on your exact requirement.
-
A simple PHP
substr()
should do, I think. But yes, would be nice to know a bit more about the OPs requirements.– IngmarDec 15, 2015 at 14:07 -
Or as someone pointed out to me, you might want to use
mb_substr()
depending if you have utf8 characters: stackoverflow.com/questions/13120732/… Dec 15, 2015 at 14:20