[fpc-pascal] A Regular Expression failing on the borders of words

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Apr 10 09:16:13 CEST 2014

On Thu, 10 Apr 2014 02:43:41 -0300
luciano de souza <luchyanus at gmail.com> wrote:

> r.expression := '^(x\s+)*(\([A-E]\))*(\s*.*\.)+(\s+\+.*\b)*(\s+ at .*\b)*$';
> if r.exec('x (A) Write a report. +ABC +DEF @John @Mary') then

The (\s+\+.*\b) matches '+ABC +DEF @John @Mary'.


More information about the fpc-pascal mailing list