Yep. The regex I first posted had a bug, or at the very least a semantic ambiguity. This fixes it. --Brett At 05:11 PM 1/14/2000 , Bill wrote: >Hi, > >here's my take (works with all your examples): > >s/^([NSEW]+?)\1+$/$1/; # (perl syntax) > >Bill >billn@videotron.ca