Javascript Regex matching xml tags -
i going match <textentryinteraction responseidentifier="response" expectedlength="15"/>
, , want occur once only. when use /<textentryinteraction [^>]+\/>/g
search , match tags, don't know why pattern.test(xml)
return false.
however, if use /<textentryinteraction [^>]+\/>/
, return true.
can helps me?
if consider looking @ jquery instead of regex type of work. can this.
var $xml = $($.parsexml(yourxmlcontent)); var $textentries = $xml.find('textentryinteraction');
you can filter textentries attribute values.
Comments
Post a Comment