I am trying to write a function that will trim all the letters off the end of a string, upto the first number it hits.
I have child product names like, item101S, item101xxx, etc. and I want to output only the parent product name: item101.
Not sure if I should be using regular expressions or !is_numeric() or what.
1 Answer