From: | Chapman Flack <chap(at)anastigmatix(dot)net> |
---|---|
To: | Kartik Ohri <kartikohri13(at)gmail(dot)com> |
Cc: | pljava-dev(at)lists(dot)postgresql(dot)org |
Subject: | Re: PL/Java new build plugin |
Date: | 2020-07-05 06:27:35 |
Message-ID: | 5F0172D7.3000708@anastigmatix.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
On 07/05/20 00:35, Kartik Ohri wrote:
> I had checked about the si flag and think it is probably the same function
> as the DOTALL flag I set for that pattern.
DOTALL is the long name of one of those flags (s); the other one (i) is
CASE_INSENSITIVE. Am I missing where they are being set?
> After the replacement, the string when written to file displays some empty
> boxes instead of the correct version. I'll share an example soon.
Oh, I think I see where that probably is. For some reason, while the
'replacement' string in the underlying java.util.regex methods uses
$1, $2, etc., to refer to captured groups, just to keep things interesting
the 'replace' attribute in an ant containsregex element uses \1, \2
instead. I bet if you ran the output through od or the like, you would see
that the two empty boxes are the byte values 001 and 002, which are what \1
and \2 in a Java string literal represent.
> I saw this as well and though that the plugin in POM executed multiple
> times with the specific argument to assign the entire output as the
> property. I did not go with that approach because I thought it was simply
> not possible for that plugin to read the output and process it to store
> different parts in multiple properties.
Have you written out the assumptions that must be true of pg_config's
output, for parsing it into the separate properties to be reliable?
Regards,
-Chap
From | Date | Subject | |
---|---|---|---|
Next Message | Kartik Ohri | 2020-07-05 10:44:08 | Re: PL/Java new build plugin |
Previous Message | Kartik Ohri | 2020-07-05 04:35:46 | Re: PL/Java new build plugin |