Hello I want to replace a string in a file but in a special way.
For example I'm searching for a string like " hideMenu()" by using the regex #"\WhideMenu\W" so that it will not return some text where hideMenu is inside like "willHideMenu()".
Well I'm using the replace function like this:
(clojure.string/replace textFile #"\WhideMenu\W" "hideMenu2")
But the problem is that it now replaces the first whitespace and last character of the textfile too.
For example if there is:
function hideMenu()
it will be:
functionhideMenu2)
Which is pretty logical but how do I use replace without loosing the first and last character? I want as result:
function hideMenu2()