In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes:
>given the expression: [0x0]
>
>I would simply like to remove it from the text string.

Substitute it with a zero-length string.

>given the expression:  [\r]
>
>I would like to replace it with \n
>
>At this time, I can locate the carriage return (i.e. [\r]) and replace it with
> a newline character (i.e. \n) but I don't know how to write one regular expre
>ssion and one substitute expression that would do all of the above.  If anyone
> has any ideas as to how to do this, it would be greatly appreciated.

You can't.

Except ...  Since you can implement the Substitution interface or
subclass Perl5Substitution, you can perform any arbitrary set of
code-driven substitutions you want.  Use "0x0|\r" as the expression
you're searching for to substitute.  Implement a Substitution
class that doesn't add anything to the appendBuffer argument if
the match is 0x0 and adds \n if the match is \r.

daniel



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to