Is there a way to remove everything before and including the last instance of a certain character?
I have multiple strings which contain >, e.g.
-
the > cat > sat > on > the > mat -
welcome > home
I need the strings to be formatted so they become
-
mat -
home
You could use a regular expression…
CodePad.
…or use
explode()…CodePad.
…or
substr()…CodePad.
There are probably many other ways to do it. Keep in mind my examples trim the resulting string. You can always edit my example code if that is not a requirement.