Fix: regex in numeric Values in meta-data #3740
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I do not know all the details, but the regex seems wrong, as numeric values are prefixed with
\
[backslash and space] (as stated in another discussion, https://stackoverflow.com/questions/2154945/how-to-force-a-meta-data-value-to-type-string , and in the file itself).This won't match with the current regex, meaning all values are non numeric.
For example if I add a log:
which is a numeric value.
In my case this leads to an issue, changing the regex and replace the unnecessary trim with a substring(2). fixes it in my case.
Not sure about any side effect, need to do a bit more testing. Just wanted to drop it here, in case anyone else has issues with numeric metadata values.