Will this effectively delete strings like: t_someString, o_someString, a_someString etc?
I don't know what the first character is going to be, _someString is the only known factor
.replace( \*\ + '_someString', '' )
Will this effectively delete strings like: t_someString, o_someString, a_someString etc?
I don't know what the first character is going to be, _someString is the only known factor
.replace( \*\ + '_someString', '' )
Huh? What's with the backslashes? And the asterisk? And the plus sign? Not sure what you're doing....
Anyway, here's a regex for that:
yourString = yourString.replace(/._someString/g, '')
. means "any character". The g flag is for global matching, so it replaces all occurences.
g possibly interfere with other parts of this string?\b to fix that.