Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6826
    wizzlepig
    Participant

    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?

    #6827
    Yutaka Emura
    Keymaster

    /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!

    #6828
    wizzlepig
    Participant

    That did the trick! Thank you for the help!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.