Hi,
I am trying to configure TextPad to work with Latex. I was following tips on www.textpad.com and everything works fine but
one thing is missing there. Namely, after compliation I would like TextPad
to jump to the right line in the source code after double-clicking it in the command results window. I know that one must insert correct "regular expression" into the tool menu, but unfortunately, I don't know the first thing about regular expressions. LateX output looks like this:
********************************************************
LaTeX Warning: Reference `sstate' on page 26 undefined on input line 893.
! Undefined control sequence.
l.960 \sectiona
{Introduction}
! Emergency stop.
\cite@adjust ... \@zero@skip \spacefactor
1001 \fi \ifnum \spacefacto...
l.974 ... known as chemotaxis~\cite{Narang}
. Corrosion of
********************************************************
where 893,960 and 974 are the line numbers I would like to
extract. Could anyone give me an idea how to do it?
Piotr
need help with regular expressions
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
Andreas
Re: need help with regular expressions
Try this:
.*l\(\(ine \)\|\(\.\)\)\([0-9]+\).*
line register should be 4
Attention: not tested!
Explanation:
.* any stuff before/after the relevant part
\(\)\|\(\) match either the stuff in the first or the second \(\)
ine is the stuff for the first kind of errors
\. is a literal dot for the second kind of errors
\([0-9]+\) takes the line number
No guarantee for it to work!
.*l\(\(ine \)\|\(\.\)\)\([0-9]+\).*
line register should be 4
Attention: not tested!
Explanation:
.* any stuff before/after the relevant part
\(\)\|\(\) match either the stuff in the first or the second \(\)
ine is the stuff for the first kind of errors
\. is a literal dot for the second kind of errors
\([0-9]+\) takes the line number
No guarantee for it to work!
-
Piotr Szymczak
Re: need help with regular expressions
It's working!! (although the line register seems to be 3 and not 4)
Thanks!
Piotr
Thanks!
Piotr
-
Andreas
Re: need help with regular expressions
Seems as if textpad counts the two alternative \(\)\|\(\) as one - as only one of them is ever considered...