Re: [xsl] Analyzing text by extracting substrings that match regex patterns

Subject: Re: [xsl] Analyzing text by extracting substrings that match regex patterns
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Mar 2025 22:24:10 -0000
On 13/03/2025 23:01, Roger L Costello costello@xxxxxxxxx wrote:
> In my opinion, SNOBOL provides a superior solution to the task of extracting
the substring of TEXT that matches PATTERN.

It has some superior anecdote about is planned name
(https://en.wikipedia.org/wiki/SNOBOL):

    According to Dave Farber,[16] he, Griswold and Polonsky "finally
    arrived at the name Symbolic EXpression Interpreter SEXI."

    All went well until one day I was submitting a batch job to assemble
    the system and as normal on my JOB card b the first card in the
    deck, I, in BTL standards, punched my job and my name b SEXI Farber.

    One of the Comp Center girls looked at it and said, "That's what you
    think" in a humorous way.

    That made it clear that we needed another name!! We sat and talked
    and drank coffee and shot rubber bands and after much too much time
    someone said b most likely Ralph b "We don't have a Snowball's
    chance in hell of finding a name". All of us yelled at once, "WE GOT
    IT b SNOBOL" in the spirit of all the BOL languages. We then
    stretched our mind to find what it stood for.

As for finding the matched text with XPath (3.1), let's not forget that
you can use

 B B B B  analyze-string('The person put 12 dollars into the jar',
'[0-9]+')/*:match/string()

Current Thread