texthero icon indicating copy to clipboard operation
texthero copied to clipboard

How can I remove all punctuation except for "@"

Open batmanscode opened this issue 4 years ago • 2 comments

Hi, I'd like to preserve the @ symbol. For my use case, this helps me identify usernames

Are there any ways I can remove all punctuation except this?

I've currently been using remove_punctuation()

batmanscode avatar Mar 17 '22 21:03 batmanscode

I don't think there's any way to do that right now.

Maybe a solution would be to change the function code and add a new parameter except_punctuation. And with that, the function would not remove the scores passed by the parameter.

richecr avatar Sep 10 '22 16:09 richecr

Seems so @richramalho. except_punctuation is a good idea!

batmanscode avatar Sep 11 '22 15:09 batmanscode