Multi Commander Support Forum
Multi Commander => Feature Requests and Suggestions => Topic started by: saved2serve on December 02, 2021, 14:29:16
-
I am trying to figure out what regex string to use in order make all characters only btwn http:// and .html within all files in selected folder(s) into lower case. Since Linux servers are case sensitive then it seems (unless one can edit a server's httpd.conf (https://brianflove.com/2014-08-11/lowercase-your-uris/)) then clicking on a link that begins with a upper case letter can result in a 404 (as here (http://www.peacebyjesus.net/Bible/John_1.html)). Thus I would think it would be helpful for there to be a simple option in the Multi Rename tool to do that (or which I do not see is there already).
-
Menu > Tools > Rename
And select lower case. And all selected files/folders are renamed to lower case
-
Thanks but I had done that and which was easy to do, but what I had asked was to change all characters btwn http:// and .html within all files in selected folders, not just the folder and files names. I looked at lot for the solution ("pray and press") and what I found as a result was that to convert upper case letters in links to lower case then
(http.*[A-Z].*\.[a-zA-Z]{2,4}) worked as a regex in Text Crawler free (though mine is an old ver. 3.0.3) to find 2,238 links in a large file of mine,
as does "http[s]?://.+?"
though (courtesy of Stefan from Grepwin) the pattern of
((http|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])) - which includes the parenthesis - seems to find more (3,2006) and also,
href="http[s]?://.+?" finds 3,0033 In Text Crawler.
I did not try \L\1 to convert to lower case since that is an option offered in the program, and running the above resulted in 3,0033 being changed, though it only changed the case.
I had also found http://e.informer.com/sobolsoft.com/html HTML Tags Change To Uppercase or Lowercase Software (http://e.informer.com/sobolsoft.com/html HTML Tags Change To Uppercase or Lowercase Software) that converts uppercase letters in links to lower case, though it is $20 if you want to convert more than one file at a time, and is very slow or can locks up with large files, but it seemed to work well to convert upper case letters in links to lower case in files that I used it for.
I do not know regex (imagine a world in which this was the written language!) but was looking to convert all the upper case caps in links to lower case, and I searched a lot trying to find out how to do this. And so thanks to all who help, whom I thank God for.
-
So you got file that are named as urls? hmm wait you can't have : in a file name so you must then mean you got a text file and the in that text files you got URL's ?