- January 16, 2009 at 6:47 pm #6826
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 ‘.’),
in the application, this string
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 #6827
/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 #6828
That did the trick! Thank you for the help!
You must be logged in to reply to this topic.