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

regExp #13

Open
NewPrototype opened this issue Aug 31, 2018 · 2 comments
Open

regExp #13

NewPrototype opened this issue Aug 31, 2018 · 2 comments

Comments

@NewPrototype
Copy link

    var regex = /(?=(YYYY|YY|MM|DD|HH|mm|ss|ms))\1([:\/]*)/;
    What's wrong with using the following?
    var regex=/(?=(YYYY|YY|MM|DD|HH|mm|ss|ms))/;

I can also use the following regular, so I want to ask

@jonschlinkert
Copy link
Owner

Can you clarify the question? I’m not sure I understand. Have you looked at what the regex is doing in the code? Your regex wouldn’t capture the second match group.

@NewPrototype
Copy link
Author

NewPrototype commented Sep 6, 2018

I use the regular var regex=/(?=(YYYY|YY|MM|DD|HH|mm|ss|ms))/; already can be normal use, I want to know the following regular
var regex=/(?=(YYYY|YY|MM|DD|HH|mm|ss|ms))/; , is to meet what kind of scene?

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

2 participants