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

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4949


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