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

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

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -