W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2009

[Bug 4949] [FO] Suggested extension to fn:replace (first match only)

From: <bugzilla@wiggum.w3.org>
Date: Fri, 06 Mar 2009 10:30:14 +0000
To: public-qt-comments@w3.org
Message-Id: <E1LfXJm-0003W8-En@wiggum.w3.org>

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Michael Kay <mike@saxonica.com>  2009-03-06 10:30:14 ---
I believe this requirement is satisfied by the new analyze-string() function.

For example, to wrap parentheses around the first sequence of numeric digits in
a string, one could write:

let $x := analyze-string($in, '\d+')
return string-join(
  for $s in $x
  return (if ($s is $x/match[1]) then concat('(', ., ')') else string(.))

I am accordingly marking this as fixed; please feel free to reopen if you feel
this is not an adequate solution to the requirement. 

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Friday, 6 March 2009 10:30:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:26 UTC