At 3:12 PM +0000 1/30/02, Michael Davey - Sun UK Support Engineer wrote:
>"Mark F. Murphy" wrote:
>>
> > Exactly what escape sequences are you looking to be parsed?
>
>\n (newline)
>\r (carrage return)
>\t (horizontal tab)
>\f (form feed)
>\b (backspace)
>\a (alert (bell))
>\e (ESC character)
>\0oo (eg \033 is ESC in octal)
>\xXX (eg \x7f is DEL in hexadecimal)
>\cC (eg \cZ is Control-Z)
All of the above are language escape sequences... not regex escaping.
For example... in perl you could use the above *anywhere* in any
string and it would parse and substitute correctly.
Java has a different set of escape sequences for control characters.
>\u (force next character to uppercase)
>\l (force next character to lowercase)
>\U (force all the remaining characters to uppercase)
>\L (force all the remaining characters to lowercase)
>\Q (backslash all following non-alphanumeric characters)
>\E (end \U \L or \Q)
These, I thought, were only regex sequences.
Ooops... I thought wrong. Just tried it in perl:
perl -e 'print "\uhello\n";'
Hello
Hmmmmm...
Well... java does do *some* control character escaping on its own.
In looking over Perl5Substitution, it looks like the additional
escape sequences could be added... but that wouldn't solve the input
escapes.
mark
--
---------------------------------------------------------------------------
Mark F. Murphy, Director Software Development <mailto:[EMAIL PROTECTED]>
Tyrell Software Corp <http://www.tyrell.com>
---------------------------------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>