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

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -