• unicode text

    From saito@saitology9@gmail.com to comp.lang.tcl on Fri Nov 8 21:28:54 2024
    From Newsgroup: comp.lang.tcl

    Is there a way to remove emojis, non-printable and other graphic
    characters from a string? I can use a regexp with a-zA-Z and such but
    this doesn't account for valid characters from non-ascii/non-Western languages, right?

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Michael Soyka@mssr953@gmail.com to comp.lang.tcl on Fri Nov 8 22:15:20 2024
    From Newsgroup: comp.lang.tcl

    On 11/08/2024 9:28 PM, saito wrote:
    Is there a way to remove emojis, non-printable and other graphic
    characters from a string? I can use a regexp with a-zA-Z and such but
    this doesn't account for valid characters from non-ascii/non-Western languages, right?

    I've found that this regular expression works for emojis:
    [^[:print:][:cntrl:]]
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From saito@saitology9@gmail.com to comp.lang.tcl on Sat Nov 9 12:57:27 2024
    From Newsgroup: comp.lang.tcl

    On 11/8/2024 10:15 PM, Michael Soyka wrote:
    On 11/08/2024 9:28 PM, saito wrote:
    Is there a way to remove emojis, non-printable and other graphic
    characters from a string? I can use a regexp with a-zA-Z and such but
    this doesn't account for valid characters from non-ascii/non-Western
    languages, right?

    I've found that this regular expression works for emojis:
       [^[:print:][:cntrl:]]

    Thanks! That is a good start.
    --- Synchronet 3.20a-Linux NewsLink 1.114