Reputation: 738
I have a Japanese dictionary table, the English words that correspond to the Japanese look something like this:
jap eng marks id
テクスト / text/ text book/ (n) 31112
I want to remove the leading and trailing slashes and spaces. it almost always have leading and trailing slashes but also have valid slashes separating the multiple English meanings. How can i write a query that will remove a given string if it is leading or trailing? In this case the "/ " is leading and "/" is trailing but sometimes there is multiple slashes on the end or front and sometimes with or without unnecessary spaces
so im thinking if I had some query like
set eng = REPLACE_LEADING_OR_TRAILING(" /", "", eng)
i could just query it with all the possibilities
REPLACE_LEADING_OR_TRAILING("//", "", eng)
REPLACE_LEADING_OR_TRAILING(" /", "", eng)
REPLACE_LEADING_OR_TRAILING(" / ", "", eng)
REPLACE_LEADING_OR_TRAILING("/ ", "", eng)
REPLACE_LEADING_OR_TRAILING("/", "", eng)
i know about the REPLACE() function but i can't see how i would do it with that because of the valid slashes in between multiple English meanings.
Upvotes: 0
Views: 977