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



Yours,
Wen Yi.







 




------------------ Original ------------------
From:                                                                           
                                             "Tom Lane"                         
                                                           
<[email protected]&gt;;
Date:&nbsp;Sun, Jun 18, 2023 09:50 AM
To:&nbsp;"Wen Yi"<[email protected]&gt;;
Cc:&nbsp;"pgsql-general"<[email protected]&gt;;
Subject:&nbsp;Re: Is there a way make the lex program match multiple line?



"=?ISO-8859-1?B?V2VuIFlp?=" <[email protected]&gt; writes:
&gt; 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.&nbsp; 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

Reply via email to