Search Postgresql Archives

Re: Is there a way make the lex program match multiple line?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I rewrite, and I think the [']([^']|\n)['] should be [']([^']|\n)+[']
Thanks very much!

Yours,
Wen Yi.



 


------------------ Original ------------------
From: "Tom Lane" <tgl@xxxxxxxxxxxxx>;
Date: Sun, Jun 18, 2023 09:50 AM
To: "Wen Yi"<896634148@xxxxxx>;
Cc: "pgsql-general"<pgsql-general@xxxxxxxxxxxxxxxxxxxx>;
Subject: Re: Is there a way make the lex program match multiple line?

"=?ISO-8859-1?B?V2VuIFlp?=" <896634148@xxxxxx> writes:
> Can someone give me some advice to make the ['].+['] match multiple string?

You should check the flex manual, but it's likely that "." doesn't
match newline.  Another problem with this pattern is that "."
*does* match "'", so it's ambiguous what will happen with quotes.
You probably need something closer to [']([^']|\n)[']

regards, tom lane

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux