From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wen Yi <896634148@qq.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Is there a way make the lex program match multiple line?
Date: Sat, 17 Jun 2023 21:50:08 -0400
Message-ID: <2659555.1687053008@sss.pgh.pa.us> (raw)
In-Reply-To: <tencent_BD0B710D6EAAD2162E0D754DABC9A60C9008@qq.com>
References: <tencent_BD0B710D6EAAD2162E0D754DABC9A60C9008@qq.com>
"=?ISO-8859-1?B?V2VuIFlp?=" <896634148@qq.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, 896634148@qq.com
Subject: Re: Is there a way make the lex program match multiple line?
In-Reply-To: <2659555.1687053008@sss.pgh.pa.us>
References: <tencent_BD0B710D6EAAD2162E0D754DABC9A60C9008@qq.com> <2659555.1687053008@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox