[Bug 1922] 'x' regex flag not entirely clear

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





------- Additional Comments From ashok.malhotra@oracle.com  2005-09-14 13:26 -------
Amended proposal based on Michael Kay observation that whitespace characters are
not allowed after the backslash and so we should strip them out if they do occur.

REVISED PROPOSAL

x: If present, whitespace characters in the regex are removed prior to matching
with one exception:  whitespace characters within character class expressions
(charClassExpr) are not removed. This can be used, for example, to break up long
regex' into readable lines.

Examples:
fn:matches("helloworld", "hello world", "x") returns true

fn:matches("helloworld", "hello[ ]world", "x") returns false

fn:matches("hello world", "hello\ sworld", "x") returns true

Received on Wednesday, 14 September 2005 13:26:53 UTC