Re: [pcre-dev] A question for PCRE

Top Page
Delete this message
Author: Giuseppe D'Angelo
Date:  
To: Charlie Fu
CC: pcre-dev@exim.org
Subject: Re: [pcre-dev] A question for PCRE
A *mandatory* answer at this point:

DO NOT USE REGULAR EXPRESSIONS TO PARSE URLS.

On Tue, 27 Aug 2019 at 07:36, Charlie Fu via Pcre-dev <pcre-dev@???> wrote:
>
> Hi,
>
> PCRE is very powerful tools. When I use it in my project, I have met a bug.
> I used
> " (\b(([a-zA-Z0-9\!\#\$\%\&\'\*\+\-\/\=\?\%_\`\{\|\}\~\.]+@)?)(((ftp|https?):\/\/)?[-\w]+\.([-\w]+\.)*(\d+\.\d+\.\d+|[-A-Za-z]+)(:\d+)?(((\/([A-Za-z0-9\-\._~:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=])*)+)\??([A-Za-z0-9\-\._~:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\%])*)?)([^A-Za-z]|$))”
>
> to grep url. But When I run in main thread everything work fine. But when I run in other thread. PCRE will match in loop more 976 times. And the project will crash. I have tried to improve the stack. But it also failed.
>
> Could you tell me the reason? Or is my regex string was error? Thank you.
>
> I hope can hear from you soon.
>
>
>
> Best wishes,
> Charlie Fu
> --
> ## List details at https://lists.exim.org/mailman/listinfo/pcre-dev




--
Giuseppe D'Angelo