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

AdvConvert does not convert TS corectly. #8

Open
jeme opened this issue Apr 26, 2016 · 1 comment
Open

AdvConvert does not convert TS corectly. #8

jeme opened this issue Apr 26, 2016 · 1 comment

Comments

@jeme
Copy link
Contributor

jeme commented Apr 26, 2016

500ms is parsed as minutes, should use lookaheads:

        private static readonly Regex timeSpanExpression = new Regex(@"((?'d'[0-9]+)\s?d(ay(s)?)?)?\s?" +
                                                                     @"((?'h'[0-9]+)\s?h(our(s)?)?)?\s?" +
                                                                     @"((?'m'[0-9]+)\s?m(?![is])(in(ute(s)?)?)?)?\s?" +
                                                                     @"((?'s'[0-9]+)\s?s(ec(ond(s)?)?)?)?\s?" +
                                                                     @"((?'f'[0-9]+)\s?(f(rac(tion(s)?)?)?)?|(ms)|(millisecond(s)?))?",
            RegexOptions.Compiled | RegexOptions.IgnoreCase);
@jeme
Copy link
Contributor Author

jeme commented Feb 13, 2017

Switch to use: https://github.com/dotJEM/adv-parsers

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

No branches or pull requests

1 participant