Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed macros patterns #36

Closed
wants to merge 1 commit into from
Closed

Conversation

for1997
Copy link

@for1997 for1997 commented Mar 24, 2021

No description provided.

@for1997 for1997 changed the title fix: macros Fixed macros patterns Mar 24, 2021
@radiantmediaplayer
Copy link
Owner

Thanks but parentheses are actually not needed here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#using_parentheses

Parentheses around any part of the regular expression pattern causes that part of the matched substring to be remembered. Once remembered, the substring can be recalled for other use. See Groups and ranges for more details.

@for1997
Copy link
Author

for1997 commented Mar 24, 2021

Thanks but parentheses are actually not needed here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#using_parentheses

Parentheses around any part of the regular expression pattern causes that part of the matched substring to be remembered. Once remembered, the substring can be recalled for other use. See Groups and ranges for more details.

No, you wrong. Parentheses is needed here. But you can use (?:x) syntax and not remember matched substring. Currently you replace this macros: "[ADCOUNT", "TRANSACTIONID", ..., "LATLONG]", but must "[ADCOUNT]", "[TRANSACTIONID]", ..., "[LATLONG]"

radiantmediaplayer added a commit that referenced this pull request Mar 24, 2021
Relates to #36 to fix macros test/replace with OR pattern
@radiantmediaplayer
Copy link
Owner

radiantmediaplayer commented Mar 24, 2021

Allright my bad. Sorry for the confusion and thanks for insisting. I have added the parentheses in 3.0.5 release.

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

Successfully merging this pull request may close these issues.

2 participants