On Tue, 15 Jun 2010 15:21:52 +0300 Juha Manninen <[email protected]> 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 and TntL1. > Does [^L]|.[^X] mean: > anything but 'L' or anything, followed by anything but 'X' ? The pipe is like an 'or' operator. [^L]|.[^X] means: Any character but L OR any character followed by any character but X. It matches a, b, La, Lb, but not LX and not L. Even better regexp is: ^Tnt(([^L]|L[^X]).*|L$) Mattias -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
