How can i use regex to get the keyword appName from possible url string like below
i have tried this
/(?<=webapp/)(.*)(?=#)/gbut it only works with example2 and example3
example1: http://localhost:1001/myapp/appName
example2: http://localhost:1001/myapp/appName#!/
example3: http://localhost:1001/myapp/appName#!/Test
example4: http://localhost:1001/myapp/appName/test/what
/(?<=\/myapp\/)[\w-]+//(?<=myapp\/).*?(?=(?:[#\/]|$))/g