javascript - With regex how do i match between an XML tag multiple times? -


first, before anything, have because rss malformed, can't correct on end. so, while tried using rss , xml parser, fail , have front end access. however, i'm super close, can't figure out why wont match.

the feed (it's long 1 line string): http://pastebin.com/5djhxcvf

first example:

<title>(.+)</title> 

this thought worked great test of just:

<title>&quot;cterrorism task force&quot; location:oregon - google news</title> 

but issue matches 1 match example:

<title>&quot;cterrorism task force&quot; location:oregon - google news</title><title>&quot;cterrorism task force&quot; location:oregon - google news</title> 

equals 1 result item in array exec() , match()

so tried:

<title>([\w\d\s\=\%\_\`\~\+\!\@\#\$\%\^\&\*\(\)\:\'\"\[\]\{\}\|\,\.\/]+)</title> 

but returns nothing... ideas?

try non-greedy version <title>(.+?)<\/title>. here can test these things online.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -