in reply to Re: Remove repeated characters from a string
in thread Remove repeated characters from a string

the duplicates are not nesscarly beside each other
where = wher Expressions = Expresion Finished = Finshed indicated = indcate

Replies are listed 'Best First'.
Re:^3 Remove repeated characters from a string
by knew (Monk) on May 13, 2004 at 15:12 UTC

    This will do that for you:

    1 while $string =~ s/(.)(.*)\1/$1$2/g
      This construction with the while loop made my day. Thanks a lot, sir knew! :D
Re:^3 Remove repeated characters from a string
by EdwardG (Vicar) on May 13, 2004 at 14:59 UTC

    If you had put more effort into your first question you would not now be explaining what you really meant.