Well, I need to study more. I can't understand what is wrong. The match starts with a blank space: \s+. Some string follows: .*. And it ends in the border of word: \b. So, (\s+.*\b)*, for me, should return: +ABC +DEF. If "@" is not present, why the rest of the string was matched.
My knowledge about Regular Expressions is small, so I really need to study more. 2014-04-10 4:16 GMT-03:00, Mattias Gaertner <nc-gaert...@netcologne.de>: > On Thu, 10 Apr 2014 02:43:41 -0300 > luciano de souza <luchya...@gmail.com> wrote: > >>[...] >> r.expression := '^(x\s+)*(\([A-E]\))*(\s*.*\.)+(\s+\+.*\b)*(\s+@.*\b)*$'; >> if r.exec('x (A) Write a report. +ABC +DEF @John @Mary') then > > The (\s+\+.*\b) matches '+ABC +DEF @John @Mary'. > > Mattias > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal > -- Luciano de Souza _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal