That does what I needed.
Thanks,
--
Raul
On Sat, Aug 30, 2014 at 11:35 AM, June Kim (김창준) wrote:
> Hi
>
> Is this what you want? (Note: \n is a backreference to n-th match of the
> pattern)
>
> assert '**123*'-:('[0-9]+';'**\0*') pysub '123'
>
> assert 'ab 123*y*45 de'-:('([0-9]+)([x]+)([0-9]
Due to rxapply(and rxfrom) bug that I posted a minute ago, you have to
currently do the following when the replacement pattern's length is 1:
('AND';,:'&') pysub 'alpha AND bravo'
alpha & bravo
Or, you may switch the definition of rxfrom in regex.ijs to the
commented-out one.
On Sun, Aug 3
Hi
Is this what you want? (Note: \n is a backreference to n-th match of the
pattern)
assert '**123*'-:('[0-9]+';'**\0*') pysub '123'
assert 'ab 123*y*45 de'-:('([0-9]+)([x]+)([0-9]+)';'\1*y*\3') pysub 'ab
123x45 de'
assert '
https://www.jsoftware.com/wiki/help/pcre/pcrepattern.html'-:('http://(
Actually, that's buggy.
I should have said:
mid=. (,:({:-{.@,,0:)M) rxcut 1{::segs
Oops...
--
Raul
On Sat, Aug 30, 2014 at 4:13 AM, Raul Miller wrote:
> J has "PCRE" regular expressions:
>
>require 'regex'
>url=: 'http://www.jsoftware.com/help/pcre/pcrepattern.html'
>>('http:
J has "PCRE" regular expressions:
require 'regex'
url=: 'http://www.jsoftware.com/help/pcre/pcrepattern.html'
>('http://[^/]+'&rxmatch rxcut ]) url
http://www.jsoftware.com
/help/pcre/pcrepattern.html
Now.. regular expressions seem like they ought to be a natural fit for
J - if nothing