KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need to remove a substring of a string, but only when it is at the END of the string. for example, removing 'string' at the end of the following strings : "this is a test string" -> "this is a test " "this string is a test string" - > "this string is a test " "this string is a test" -> "this string is a test" Any idea's ? Probably some kind of preg_replace, but how??
Tags (comma-separated)
Save Edits
Cancel