Replace underscore between words (reg.exp)
- by lasseespeholt
Hey,
I need a regular expression to solve the following problem (links to similar problems is also appreciated, related tutorials etc.):
__some_words_a_b___ => __some words a b___
____ => ____
So I want underscores between words to be replaced with space and keep leading and trailing underscores. I found this:
^[ \t]+|[ \t]+$
and I…