Skip to content

Fix issue #90: Add regex escape for format regex generation#91

Open
abhi-patel wants to merge 1 commit intoclemens:masterfrom
abhi-patel:issue_90
Open

Fix issue #90: Add regex escape for format regex generation#91
abhi-patel wants to merge 1 commit intoclemens:masterfrom
abhi-patel:issue_90

Conversation

@abhi-patel
Copy link

No description provided.

Copy link

@dima4p dima4p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job

@clemens
Copy link
Owner

clemens commented Sep 15, 2017

Sorry, I missed this PR because you created it while I was on vacation. :)

@abhi-patel Please provide a test with it, then I'll merge it right away.

@abhi-patel
Copy link
Author

@dima4p @clemens - There is one issue with this solution, that is this will not work correctly with formats containing '%-m' or '%-d', as '-' is also regex special character and Regexp.escape will escape that as well.

I am thinking on best possible work around for this, meanwhile if you can think of some better way to fix that, let me know.

@dima4p
Copy link

dima4p commented Sep 15, 2017

gsub(/%\\-/, '%') as keys to not have values with "-"

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.

3 participants