Regexp backreferences

Asked by chrism

Hi,

I've tried as many of the standard ways of getting backreferences in find/replace regexp operations to work, but I can't seem to. has this been implemented and if so, what syntax should be used?

thanks!

Chris

Question information

Language:
English Edit question
Status:
Answered
For:
Scribes Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mystilleef (mystilleef) said :
#1

Use the Python syntax \1 \2 and so on. See the Python re documentation.

Revision history for this message
chrism (ubuntu-dirtchild) said :
#2

thanks....

the python docs (http://docs.python.org/library/re.html) shed some light on this. Standard back refs (i.e. \1,...,\n) are acting odd and replacing for what looks like is in the clipboard. however, using the absolute notation:

\g<1>,...,\g<n>

works

Can you help with this problem?

Provide an answer of your own, or ask chrism for more information if necessary.

To post a message you must log in.