pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Wen Yi <896634148@qq.com>
To: Tom&nbsp;Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Is there a way make the lex program match multiple line?
Date: Sun, 18 Jun 2023 10:53:39 +0800
Message-ID: <tencent_D2F4990B589DF8AA97A93B645C5CA39BA406@qq.com> (raw)
In-Reply-To: <2659555.1687053008@sss.pgh.pa.us>
References: <tencent_BD0B710D6EAAD2162E0D754DABC9A60C9008@qq.com>
	<2659555.1687053008@sss.pgh.pa.us>

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



Yours,
Wen Yi.







 




------------------ Original ------------------
From:                                                                                                                        "Tom Lane"                                                                                    <tgl@sss.pgh.pa.us>;
Date: Sun, Jun 18, 2023 09:50 AM
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?



"=?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

view thread (3+ messages)

Message-ID: <tencent_D2F4990B589DF8AA97A93B645C5CA39BA406@qq.com>
Permalink:  ../tencent_D2F4990B589DF8AA97A93B645C5CA39BA406@qq.com/
Also on:    postgresql.org/message-id/tencent_D2F4990B589DF8AA97A93B645C5CA39BA406@qq.com

 · 

reply

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: 896634148@qq.com, tgl@sss.pgh.pa.us
  Subject: Re: Is there a way make the lex program match multiple line?
  In-Reply-To: <tencent_D2F4990B589DF8AA97A93B645C5CA39BA406@qq.com>
  References: <tencent_BD0B710D6EAAD2162E0D754DABC9A60C9008@qq.com> <2659555.1687053008@sss.pgh.pa.us> <tencent_D2F4990B589DF8AA97A93B645C5CA39BA406@qq.com>

* 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