regex - How to fetch text using reg exp in javascript -


i need fetch text after / below code.how achieve one.i tried find '/' location or index value search() didn't worked.the scenario need fetch text consists 2 parts 'username / text'. user name dynamic , need text after '/' in html looks (for 1 instance)

<a id="open_0" class="search-result-heading" data-gistname="15b6402d51d897f2ed29" "="" href="http://127.0.0.1:8080/edit.html?notebook=15b6402d51d897f2ed29">tejas1493 / zzzz</a> 

i able fetchtext above after fetching need ' / zzzz ' text

try one...it might work. output zzzz.

path = "path of selector"; var pos = path.lastindexof("/"); var name = path.substring(pos+1 , date.length-1); 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -