Community
    • Login

    Notepad++ Form-Feed Character

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 2.7k Views 2 Watching
    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 Offline
      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 Online
        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors