- AuthorPosts
- January 16, 2009 at 6:47 pm #6826wizzlepigParticipant
I am having some trouble using regex in a command line format.
Some of the “find” strings work when I test them in the application, but fail to do anything when I use them from a command line. For example, this line in a script-generated directory listing, (which has had its numerous extra spaces edited out by the forum editor software, so I replaced them with ‘.’),
“Mode……………LastWriteTime…..Length.Name………………..n”
in the application, this string
Mode.*LastWriteTime.*Length Name.*n
works to replace this line, but it fails from command line when entered like this:
“C:Program FilesEmEditoremeditor.exe” /fi “Mode.*LastWriteTime.*Length Name.*n” /x “c:tempfile.txt” /rw “”
are there different rules for regex find and replace from a command line?
January 16, 2009 at 7:08 pm #6827Yutaka EmuraKeymaster/fi is used for “Find in Files” command. In this case, you will need to use “rn” instead of “n” for new lines. See http://www.emeditor.com/help/howto/search/search_nl.htm for details. Thanks!
January 16, 2009 at 9:59 pm #6828wizzlepigParticipantThat did the trick! Thank you for the help!
- AuthorPosts
- You must be logged in to reply to this topic.