Community
    • Login

    Notepad++ Form-Feed Character

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • John BurrJ
      John Burr
      last edited by

      How can I put a Form-Feed Character (\f or ASCII character 012) into a file using find and replace?

      I work with data files and occasionally, they do need to have a Form-Feed Character. Without the boring details, from time-to-time I need to do a find at replace to change a pattern of characters into a Form-Feed. Notepad++ does recognize the character when it is already in the data, but it does not recognize the ‘\f’ escape version of the character. So what is another way to do this?

      NOTE: This has nothing to do with printing and everything to do with taking a data file from an old system and feeding it into a newer system in a situation where I don’t have access to any real language. (No, not even Python or R. Don’t bother asking because I won’t bother telling.) But, strangely enough, I do have Notepad++.

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @John Burr
        last edited by

        @john-burr

        In regular expression mode, \f will enter ASCII 12. So check the Search Mode = Regular Expression to get that behavior when you replace

        mode before after
        normal 76faf0ba-02fe-4c8e-99d4-02983e04e63f-image.png 47b949a5-492d-48ae-8445-e41eb733d2f5-image.png
        extended 3f74a214-8b64-439d-ba5b-ecff837ab2b6-image.png 222327ea-62ae-430c-b4a4-03478d210938-image.png
        regular expression eec66efc-a0fa-4860-b31b-abc26bebc77b-image.png 7e62c935-8c72-47a5-983a-4d18d183cdd5-image.png

        see:

        https://npp-user-manual.org/docs/searching/#regular-expressions
        https://npp-user-manual.org/docs/searching/#control-characters

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors