I'm trying to remove characters between / and # characters, my string is the following one:
platform:/this/is/a/path/contentToRemove#OtherContent
The replacement which I executed was:
aString.replaceAll("/.*?#", "#")
but what I was given in return was:
platform:#OtherContent
when I wanted:
platform:/this/is/a/path/#OtherContent
How should I have done this correctly using Regex? Is there any other solution to accomplish which I want?
Thanks.
.*to[^/].