Hacker News new | past | comments | ask | show | jobs | submit login

What would be the equivalent in Python to the :punct: character class operator? I don't think the re module supports those. I guess they'd have to be spelled out pretty much?



I guess that would be re.escape(string.punctuation), I've never looked/thought about it though.


Figured as much after I played around with making this work. Thanks!




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: