And substitutes the full "d: d" by only d. Try adding ":" to your character class (s/([()\w\s:-]+): \1/$1/).triple hybrid: dehydrofolate ^--Here
In reply to Re: Understanding regex
by deibyz
in thread Understanding regex
by Hena
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |