Community
    • Login

    Add single quote and comma

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 20.0k Views 1 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.
    • chin patC Offline
      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 Offline
        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

        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