A brute force approach would be to use a "while" loop to go through the
string character by character checking each character using the "Whitespace"
or "Lexical Class" comparison functions. When you hit the first real
character in the string, you terminate the while loop and use the iteration
counter to split the heading whitespace from the rest of the string.
If you want to eliminate all whitespace, then simply build a new string in a
shift register, and as you test each character from the original string
either append it to the new string or not, depending on what it is. However,
using "search and replace" three times may execute faster if you only want
to zap those three characters, even though it would initially appear less
efficient.
Bassam
@no.email> wrote in message
news:506500000005000000221F0000-984882144000@quiq.com...
> thanks Brian, But can I use Search and Replace String function to
> replace linefeed, carriage return, and spaces at the same time? I
> tried to do [\s\n\f] and it didn't work. It only work either. Do i
> need to use Search and Replace String three times to solve that
> problem? Answer is greatly appreciated...Bassam