Menu

#12 Warning: unrecognized character escape sequence: \/

v1.0 (example)
open
nobody
None
5
2022-03-21
2015-11-12
icnocop
No

Thank you for FART 1.99b.

When replacing a string that has a forward slash, FART produces a warning:
Warning: unrecognized character escape sequence: \/

But it still works.

Here is an example:
fart.exe -C "%ProgramFiles%\OpenSSH\etc\passwd" "\/home\/" "\/cygdrive\/c\/Users\/"

There are also some other examples in the comments/discussion of the article here:
https://emtunc.org/blog/03/2011/farting-the-easy-way-find-and-replace-text/

Thank you.

Discussion

  • Andrey Kazak

    Andrey Kazak - 2022-03-21

    Greetings!
    I use

    fart.exe --preview --c-style "%%~fF" "\\/" "/"
    

    but experience the same "Warning: unrecognized character escape sequence: \/" issue, but in my case FART 1.99b does 0 replacements...

    Is there workaround to replace "\/" with "/"?

    Thank you.

     
    • icnocop

      icnocop - 2022-03-21

      fart.exe doesn't make replacements when you pass '--preview'.

       
      • Andrey Kazak

        Andrey Kazak - 2022-03-21

        OK, got it.
        However nothing changes if I remove '--preview' key.

         
    • icnocop

      icnocop - 2022-03-21

      Also, this project moved to https://github.com/lionello/fart-it

       
      • Andrey Kazak

        Andrey Kazak - 2022-03-21

        Thank you for the suggestion.
        I create a new issue at the current project's home.

         

Log in to post a comment.

MongoDB Logo MongoDB