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.

filter function


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

image - ClassNotFoundException when add a prebuilt apk into system.img in android -