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

Simplify const declaration for regex #612

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

Conversation

Gitoffthelawn
Copy link

I'm not sure about this... I noticed this strange literal within this const declaration.

If this literal is not needed, please accept the PR. If it's needed, please reject the PR, and if you have time, explain why the matching that literal within the pattern is needed. It looks like perhaps a literal for an exception that is possibly no longer needed.

I'm not sure about this... I noticed this strange literal within this `const` declaration.

If this literal is not needed, please accept the PR.  If it's needed, please reject the PR, and if you have time, explain why the matching that literal within the pattern is needed.  It looks like perhaps a literal for an exception that is possibly no longer needed.
@jonsjava
Copy link

jonsjava commented Mar 6, 2023

gimsuy is a regex flag, not a literal.

  • g - global
  • i - case insensitive
  • m - multiline
  • s - single line
  • u - unicode
  • y - sticky

@Gitoffthelawn
Copy link
Author

gimsuy is a regex flag, not a literal.

* g - global

* i - case insensitive

* m - multiline

* s - single line

* u - unicode

* y - sticky

Thanks so much. Why aren't the flags located at the end of the regex, as is typical?

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.

2 participants