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
    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.



  • @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


Log in to reply