Even better regexp is:
^Tnt(([^L]|L[^X]).*|L$)
Thanks.
In this case even my original regexp may be good enough. There are always many
characters following LX. This was a corner case anyway when trying to
convert Tnt* 3rd party components to LCL fall-back components.
The fall-back rules
On 15 June 2010 19:40, Hans-Peter Diettrich drdiettri...@aol.com wrote:
Mattias Gaertner schrieb:
Even better regexp is:
^Tnt(([^L]|L[^X]).*|L$)
I wonder who will be able to understand and update such expressions, at any
later time. To me it looks like typical write-only code :-(
I'd
Hi
any regexp gurus out there?
For converter I need a regexp that matches a string starting with Tnt, not
followed by LX and captures everything after Tnt. This actually works:
^Tnt([^L][^X].+)
but I am sure it could be written in a cleaner way.
Then there is another regexp that captures
On Tue, 15 Jun 2010 11:12:52 +0300
Juha Manninen juha.manni...@phnet.fi wrote:
Hi
any regexp gurus out there?
For converter I need a regexp that matches a string starting with Tnt, not
followed by LX and captures everything after Tnt. This actually works:
^Tnt([^L][^X].+)
This would
but I am sure it could be written in a cleaner way.
^Tnt(([^L]|.[^X]).+)
Hmmm... It doesn't look very clean. It may be more correct but I am not sure
of that.
Does [^L]|.[^X] mean:
anything but 'L' or anything, followed by anything but 'X' ?
Juha
--
On Tue, 15 Jun 2010 15:21:52 +0300
Juha Manninen juha.manni...@phnet.fi wrote:
but I am sure it could be written in a cleaner way.
^Tnt(([^L]|.[^X]).+)
Hmmm... It doesn't look very clean. It may be more correct but I am not sure
of that.
It is not very clean. It does not match TntL
^Tnt(([^L]|.[^X]).+)
Hmmm... It doesn't look very clean.
I don't think *any* regex looks clean. ;-)
--
Regards,
- Graeme -
___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
--
On Tue, Jun 15, 2010 at 23:55, Mattias Gaertner
nc-gaert...@netcologne.de wrote:
On Tue, 15 Jun 2010 15:21:52 +0300
Juha Manninen juha.manni...@phnet.fi wrote:
but I am sure it could be written in a cleaner way.
^Tnt(([^L]|.[^X]).+)
Hmmm... It doesn't look very clean. It may be more
Mattias Gaertner schrieb:
Even better regexp is:
^Tnt(([^L]|L[^X]).*|L$)
I wonder who will be able to understand and update such expressions, at
any later time. To me it looks like typical write-only code :-(
DoDi
--
___
Lazarus mailing list
Hans-Peter Diettrich schrieb:
^Tnt(([^L]|L[^X]).*|L$)
I wonder who will be able to understand and update such expressions, at
any later time. To me it looks like typical write-only code :-(
Yes, I also never got accustomed to regex syntax.
But I know that some are using it frequently.
10 matches
Mail list logo