A
Adam Akhtar
Hi did a search for word boundaries but didnt quite find what i was
looking for.
If i have strings containing products and model numbers
e.g.
"JP-ATH Headphones JP"
and I want to remove the last JP but not the one in the modle number how
do i go about it,
i tried
string.gsub(/\bJP\b/, '')
but it removes both.
I guess the hypen in the model number doesnt count as a word letter so
it gets knocked off.
am i doing something wrong here?
looking for.
If i have strings containing products and model numbers
e.g.
"JP-ATH Headphones JP"
and I want to remove the last JP but not the one in the modle number how
do i go about it,
i tried
string.gsub(/\bJP\b/, '')
but it removes both.
I guess the hypen in the model number doesnt count as a word letter so
it gets knocked off.
am i doing something wrong here?