Inefficient regular expression
marshalmiller opened this issue · 0 comments
marshalmiller commented
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: