List Info

Thread: Leaving First Char Ocurrence only




Leaving First Char Ocurrence only
user name
2006-01-30 23:29:55
This problem appeared in the database context where many
solutions were
suggested. I wonder if RegExp method apply. Given a string,
scan it
from the left to the right and leave only the first
character found.
For example, strings

AAABBCCDDEEA
BBDDDFFAACC
DHSGHDADSFDF

should be compressed into

ABCDE
BDFAC
DHSGAF

correspondingly.

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )