Is it possible replace using regular expressions with subexpressions AND use the subexpression matches in the replacement? Text: xxxFOOBARxxx Search string: (FOO|BAR) Replacement string: yyy$1 Result: xxxyyyFOOyyyBARxxx scanf replacement isn't much of a help. rgds -- Nabil Sayegh