On Mon, Nov 29, 2010 at 8:30 AM, stefano franchi
<[email protected]>wrote:
> Dear Lyxers,
>
> I am trying out the new advanced search with regexes, and I cannot figure
> out how to use backreferences in the replace part of the dialog.
>
> I am used to using \1 \2 etc. as back references to first match, second
> match, etc., but if I try to replace dashes with en-dashes between numbers
> with:
>
> Find: ([0-9])-([0-9])
>
> Replace: \1--\2
>
>
> Lyx replaces the matched expressions with {\1--\2}.
>
> There must be something quite basic I am overlooking.
>
>
>
Indeed there was. It turns out you need to type the backslash twice to
obtain a back-reference. Found out in the advanced search manual from the
wiki (which Lyx 2Beta does not load, however. I had to compile the last
development version to read it).
Cheers,
S.
> Cheers,
>
> Stefano
>