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

Update patmch_v1.d #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update patmch_v1.d #34

wants to merge 1 commit into from

Conversation

mikey-b
Copy link

@mikey-b mikey-b commented Sep 11, 2016

Rewritten to give D a strong chance at the benchmark.
Unfortunately, there are some limitations to the D regex regarding encoding (As you found). https://dlang.org/phobos/std_regex.html#Unicode%20support

You can clean the howto file with
iconv -f iso-8859-1 -t utf-8 howto > howto2

Line 12 can be rewritten with a compile-time generated Regex engine,
auto re = ctRegex!(r"([a-zA-Z][a-zA-Z0-9]*)://([^ /]+)(/?[^ ]*)");
if you feel it fair to sacrifice the command-line pattern option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant