Hi:
On Fri, Oct 24, 2014 at 6:13 PM, twoflower wrote:
> It works very vell. However, I am not completely satisfied with i as it's
> unnecessarily loading larger data set than it absolutely must. Besides, I'd
> also like to get some experience in DB programming. That's why the PL/Perl
> way
Thank you Francisco.
In fact, I am already solving part of the problem in my application -
fetching from the DB the records matching the source pattern and then
filtering them in the application's memory by matching against the target
pattern, with the references replaced (it's a breeze in C#).
I
Hi:
On Fri, Oct 24, 2014 at 8:24 AM, twoflower wrote:
> Thank you Francisco, that's a clever idea. However, I don't think this
> would
> reduce the complexity since the target pattern can contain
>
> 1) regular back-references (referencing to matches of its own)
> 2) the special source text refe
Thank you Francisco, that's a clever idea. However, I don't think this would
reduce the complexity since the target pattern can contain
1) regular back-references (referencing to matches of its own)
2) the special source text references I mentioned
Obviously, these will have to be written in a di
This yields a successful match since $1 in the /target pattern/ is replaced
> by "123" from the first captured group in *source* and the resulting
> string,
> "123 target text", matches the /target pattern/.
> I would like to execute a query which for a given /source pattern/ and
> /target pat
David G Johnston wrote
>
> twoflower wrote
>> Source: 123 source text
>> Target: 123 target text
>> Source pattern: ([0-9]+) source text
>> Target pattern: $1 target text
>>
>> Still, isn't there some super clever way to do that?
> You use "\1" instead of "$1"
>
> SELECT regexp_replace('123 abc'
( Forgot reply all, forwarding a copy, sorry for the noise. )
Hullo.
On Thu, Oct 23, 2014 at 4:03 PM, twoflower wrote:
>
> my scenario is this: I have a *SEGMENT* table with two text fields,
> *source*
> and *target*. From the user, I get the following input:
>
> /source pattern/
> /target patt
twoflower wrote
> Source: 123 source text
> Target: 123 target text
> Source pattern: ([0-9]+) source text
> Target pattern: $1 target text
>
> Still, isn't there some super clever way to do that?
You use "\1" instead of "$1"
SELECT regexp_replace('123 abc','(\d+)\s(\w+)','\1 def'); --output: '1
twoflower writes:
> Supposing *source* matches the /source pattern/, the $/n/ expressions inside
> the /target pattern/ correspond to the captured groups inside *source*.
> Example:
> Source: 123 source text
> Target: 123 target text
> Source pattern: ([0-9]+) source text
> Target pattern: $1 ta
Hello,
my scenario is this: I have a *SEGMENT* table with two text fields, *source*
and *target*. From the user, I get the following input:
/source pattern/
/target pattern/
Where both patterns are regexes and moreover the target pattern contains
references to the source in the following way:
10 matches
Mail list logo