Help for this page

Select Code to Download


  1. or download this
    %
        ^
    ...
        \s*
        $
    %x
    
  2. or download this
    <foo><bar></bar></foo> # Match
    <foo><bar></foo></bar> # No match
    ...
    
    This single regex can actually test XML well-formedness :)
    (Doesn't take <?xml?> and <!DOCTYPE> etc, though)