please help with my regular expression

John Ferrier john_j_ferrier at yahoo.com
Fri Feb 20 20:37:43 CET 2009


It make no difference. The following works:

<[0-9]+(\.[0-9]*)?([DEde][-+]?[0-9]*)?|[0-9]*\.[0-9]+([DEde][-+]?[0-9]*)?>

Thanks anyway.

John


________________________________
From: Bert Wesarg <bert.wesarg at googlemail.com>
To: General NEdit discussion list <discuss at nedit.org>
Sent: Friday, February 20, 2009 11:50:34 AM
Subject: Re: please help with my regular expression

On Fri, Feb 20, 2009 at 18:15, John Ferrier <john_j_ferrier at yahoo.com> wrote:
> The following regular expression used in fortan language to match numerical constant
>
>         <[0-9]+(\.[0-9]*)?([DEde][-+]?[0-9]*)?|\.[0-9]+([DEde][-+]?[0-9]*)?>
You should not use <> as 'delimiters', because that would not work
with a '.' inside. Try this:

    (?<!\Y)[0-9]+(\.[0-9]*)?([DEde][-+]?[0-9]*)?|\.[0-9]+([DEde][-+]?[0-9]*)?(?!\Y)

Bert
-- 
NEdit Discuss mailing list - Discuss at nedit.org
http://www.nedit.org/mailman/listinfo/discuss



      


More information about the Discuss mailing list