Re: [xsl] Replace the portion of text that matches pattern: XPath versus SNOBOL

Subject: Re: [xsl] Replace the portion of text that matches pattern: XPath versus SNOBOL
From: "David Carlisle d.p.carlisle@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 23 Mar 2025 11:57:23 -0000
On Sun, 23 Mar 2025 at 11:16, Michael Kay michaelkay90@xxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> >
> >
> > I'd probably have used
> >
> >
> > replace($WORD, '^([^A]*)A', '$1E')
> >
>
> But that relies on doing a negative match, which is tricky to achieve it
> it's more than one character you're trying to replace.
>

well true, which is why (most likely)  *?  got added to most regex
flavours, but still I tend to reach for [^ before thinking of  *?
just because...

David


> Michael Kay
> Saxonica

Current Thread