Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inefficient regular expression #279

Open
1 task
marshalmiller opened this issue Jan 1, 2024 · 0 comments
Open
1 task

Inefficient regular expression #279

marshalmiller opened this issue Jan 1, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Issues for the HacktoberFest event. help wanted Extra attention is needed python

Comments

@marshalmiller
Copy link
Collaborator

The regular expression might be slowing down the program. It's a bit cumbersome. Here is my suggested replacement. I will update it once I have the proper tests in place.

"(https://www.|http://www.|https://|http://)?[a-zA-Z]{2,}(.[a-zA-Z]{2,})(.[a-zA-Z]{2,})?/[a-zA-Z0-9]{2,}|((https://www.|http://www.|https://|http://)?[a-zA-Z]{2,}(.[a-zA-Z]{2,})(.[a-zA-Z]{2,})?)|(https://www.|http://www.|https://|http://)?[a-zA-Z0-9]{2,}.[a-zA-Z0-9]{2,}.[a-zA-Z0-9]{2,}(.[a-zA-Z0-9]{2,})?"

Tracking issue for:

@marshalmiller marshalmiller added enhancement New feature or request python labels Jan 1, 2024
@marshalmiller marshalmiller self-assigned this Jan 1, 2024
@marshalmiller marshalmiller added help wanted Extra attention is needed good first issue Good for newcomers hacktoberfest Issues for the HacktoberFest event. labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Issues for the HacktoberFest event. help wanted Extra attention is needed python
Projects
None yet
Development

No branches or pull requests

1 participant