Get javascript regex link

How can I get the first parameter of a function using javascript regex? For example, I have this element on a page and I want to get an inline link when a tag is clicked. sample:

<li><a href="#blog" data-rel="close" onclick="getRSSFeed('http://moi.ir/Portal/RssPage/ShowRss.aspx?CategoryID=541ac873-3706-4f31-97e7-5cd6d51170eb','BlogList');">news</a></li>

      

I want this text: http://moi.ir/Portal/RssPage/ShowRss.aspx?CategoryID=541ac873-3706-4f31-97e7-5cd6d51170eb

+3


source to share


1 answer


onclick[^(]*\('([^']+)

      

Try it. Take groups. 1. View the demo.



http://regex101.com/r/yR3mM3/54

+3


source







All Articles