On 12/06/2011 1:28 p.m., Tommaso Cucinotta wrote:
Il 12/06/2011 00:13, Tommaso Cucinotta ha scritto:
Il 06/06/2011 10:09, Andrew Parsloe ha scritto:
I've been doing some experimenting with the regular expression
facility in advanced find & replace. (Windows Vista).
[...]
Hi, thanks a lot for the detailed report. I'm going to look at these
issues one by one. I just started from probably the simplest, the
number 2, hopefully fixed in commit r39013 on the svn trunk. Number 1.
happens with instant preview on, will think of how to fix soon. Others
following.
Also, you might want to create a bug report (or more than one) for
these problems.
After r39019, I should have only issue 5. left and the others fixed :-).
Would you be able to confirm this on your system as well ?
Thanks,
T.
Thanks for the replies and the remedial work Tommaso. I'm afraid I'm
still dependent on downloading Windows binaries, so it won't be until
LyX 2.0.1 becomes available that I'll be able to test anything new.
There was some talk on this list about making development versions of
LyX available for wider testing. It would be a great idea.
I based my initial 'experiments' on the TeXworks documentation. I've
since found the Qt documentation on regexps, which is clearer, but I
have no idea how much of Qt's regexp functionality has been 'designed
in' to LyX. I can get nearly everything detailed there to work in LyX,
often with a slight variation. For instance (with E=regexp expression)
Qt claims E{n,m} matches at least n and at most m occurrences of E. In
LyX, you need to put this in parentheses (E{n,m}) and it will work.
I find myself using an ERT inset in the Search window to input regexps.
It allows the caret or circumflex ^ to be used for negation. In an ERT
inset \regexp{{{[^aeiouAEIOU\W]}}} with Case sensitive on will find
only consonants (and underscore _). That use of the caret seems to me
valuable, but in a 'proper' regexp inset if the caret is entered
directly, it opens a superscript inset, or entered with a backslash it
is interpreted by LyX as \mathcircumflex and certainly doesn't give
negation, but this might be the desired behaviour in other cases.
One other issue that I've found is \B, which is equivalent to \b, a word
boundary, if Case sensitive is off. \D, \S and \W are similarly
equivalent to their lower-case counterparts \d (digit), \s (space) and
\w (word character) if Case sensitive is off, but become their
negations, non-digit, non-space, non-word character, if Case sensitive
is on. The latter is in accord with the Qt documentation, but \B doesn't
behave in this way. For instance, with Case sensitive on, t\B should
match just the "t" in "match". In fact it matches "tc" -- two
characters. Similarly, \Bt should match the "t" in "match" but doesn't
match anything as far as I can tell.
Andrew