I am trying to split a string at the first occurence of "/" character. I'm able to split it into multiple elements using split('/') but when I try to split the the string at the 1st occurence of "/" character using a greedy operator (?) I'm not able to get the desired string..
Javascript Code
var url_string ="http://localhost:8080/myapp.html#/"
var sub_url = url_string.split(/(.+)?/)[1];
Current output.
http://localhost:8080/myapp.html#/
Desired Output..
myapp.html#/
Can't understand what I'm doing wrong.please help!!