Mystic_09
- Karma
- 1
- Created
- January 8, 2025 (1y ago)
- Submissions
- 0
-
I’ve been trying to optimize a script that processes a huge text file, but my regex seems to be the bottleneck. Here’s the snippet: python Copy code import re pattern = re.compile(r"(?:https?|ftp)://[^\s/$.?#].[^\s]*")…