You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-dev@jakarta.apache.org by bu...@apache.org on 2004/05/27 14:03:45 UTC

DO NOT REPLY [Bug 24234] - Doesn't seem to be a way to use '\' in subst with back_references

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=24234>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=24234

Doesn't seem to be a way to use '\' in subst with back_references





------- Additional Comments From vgritsenko@apache.org  2004-05-27 12:03 -------
I think that patch introduces more confusion than it solves. \$ without
REPLACE_WITH_ESCAPES is still escaped - but logic suggests otherwise.
Additionally, behavior of escaping $ with \ is not documented in Javadoc and not
reflected in the unit test.

Because this behavior is not documented, and it was introduced recently (in
previous release), I suggest to change it (and document in javadoc / unit test).
I suggest following syntax:

When REPLACE_BACKREFERENCES is on:
  Process all $ as backreferences. No escaping performed at all.

When REPLACE_BACKREFERENCES and REPLACE_WITH_ESCAPES both are on:
  Process all $ as backreferences.
  Process \ as escape symbol.

So, what do you think?

Vadim

---------------------------------------------------------------------
To unsubscribe, e-mail: regexp-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: regexp-dev-help@jakarta.apache.org