Community
    • Login

    Add single quote and comma

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 15.2k 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.
    • chin patC
      chin pat
      last edited by

      How can I add single quote and comma for each of the sequence no and also how can I get this on a column like this
      actual data: 12345 56789 23456 56789 56789

      preference 1: ‘12345’, ‘56789’, ‘23456’, ‘56789’, ‘56789’
      preference 2:
      12345
      56789
      23456
      56789
      56789

      Thanks for sharing your knowledge.

      1 Reply Last reply Reply Quote 0
      • Terry RT
        Terry R
        last edited by

        @chin-pat said in Add single quote and comma:

        How can I add single quote and comma for each of the sequence no and also how can I get this on a column like this

        To get this:
        ‘12345’, ‘56789’, ‘23456’, ‘56789’, ‘56789’
        use the following regular expression in the Replace function (search mode is regular expression). Note the single quote isn’t what you show in the post, verify I have the correct one as the posting engine does change quotes when not inside the black boxes (se the </> icon to encapsulate examples)
        Find What:\d+(?=(\x20)|$)
        Replace With:'$0'(?1,)

        To get this
        12345
        56789
        23456
        56789
        56789
        use the following regular expression
        Find What:\x20
        Replace With:\r\n

        Terry

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