[Bug 6148] New: [F+O] Requirement: string replace without regex

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

           Summary: [F+O] Requirement: string replace without regex
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 1.1
        AssignedTo: mike@saxonica.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


There is a common requirement to perform simple string replacement (for
example, replace all occurrences of "M. Kay" with "Michael Kay"). This is
tricky to achieve using the replace() function because (a) the second argument
is treated as a regular expression, which means that characters like "." have a
special meaning, and (b) the characters "$" and "\" have a special meaning in
the replacement string.

Some possible approaches to meeting this requirement are (a) a function to
escape all metacharacters in a string (change "M. Kay" to "M\. Kay"), (b) a new
function replace-strings(), (c) a new flag for use in the flags argument of
replace().


-- 
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 Thursday, 9 October 2008 12:57:07 UTC