in reply to Re^2: substitution in regular expression
in thread substitution in regular expression

So how should the string end up, as 'DEF' or as 'EF'?

Replies are listed 'Best First'.
Re^4: substitution in regular expression
by aeqr (Novice) on Apr 23, 2014 at 20:15 UTC
    Well it doesn't matter as long as the dictionary contains DEF in the last entry.
      Well it doesn't matter as long as the dictionary contains DEF in the last entry.

      That appears to conflict with your originally stated requirement that the first of the three letters matched is to be removed.

      Should the string be modified, shouldn't it be modified, or does it not matter whether the string is modified or not?

        Sorry for being unclear, I would like to do this the way I've shown(global matching or replacement and in one line). It doesn't matter if the string is modified or not. In my attempt, it is modified because of the way I am trying to do it.

        But if you have a similar solution that doesn't modify the string, it's also fine.