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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wen Yi <896634148(at)qq(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Is there a way make the lex program match multiple line?
Date: 2023-06-18 01:50:08
Message-ID: 2659555.1687053008@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"=?ISO-8859-1?B?V2VuIFlp?=" <896634148(at)qq(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wen Yi 2023-06-18 02:53:39 Re: Is there a way make the lex program match multiple line?
Previous Message Wen Yi 2023-06-18 01:17:53 Is there a way make the lex program match multiple line?