How do I strip all every character from a string except
#,~0-9a-zA-Z
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
strip everything from a string except a list of characters.
Re: strip everything from a string except a list of characters.
this is what I came up with...
data = re.sub("([^0-9a-zA-Z\,\~\#])", '', data)
data = re.sub("([^0-9a-zA-Z\,\~\#])", '', data)