On Tue, Apr 1, 2025 at 10:41 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Tue, Apr 1, 2025 at 6:15 AM Marcos Pegoraro <marcos@f10.com.br> wrote:
>>
>> Em ter., 1 de abr. de 2025 às 02:00, David G. Johnston <david.g.johnston@gmail.com> escreveu:
>>
>> Wouldn't it be good to add the use of parentheses using posix ? It's useful and rarely documented
>> <literal>substring('Thomas', '...$')</literal>
>> + <literal>substring('Email: johnjohn@mymail.com, Name: John' from '@(.*), Name')</literal>
>>
>
> Agreed. A second example using () would be good here.
>
actually,
section (9.7.3.)
https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP
already have example, like:
substring('foobar' from 'o(.)b')
new patch attached, split substr, substring to make review more easier.
v6-0001: add function argument name to function substr
v6-0002: add function argument name to function substring
v6-0002 incorporated some of the changes in v5-0002-v3-delta.patch.
some of the changes in v5-0002-v3-delta.patch are not related to this thread,
so I didn't incorporate them, right now.