I need to replace double slashes in a wiki markup with something else (double slashes stands for italic text).
How can I match italic text, without URLs?
This regexp is for a text where are no URLs: //(.*?)//
Problem appears when there is a text like:
//italic text// and this is only http://some.url/somewhere and this is //another italic text// yeah
I'm using Java.
Anonymous User
14-Oct-2013Hey Ida
Use this Code:
It requires that // does not have: in front of it. This would catch most URL forms.
Also, I changed your (.*?) to (.+?) - it requires at least 1 character between // to be valid - your code would allow ////.