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 have a list of strings in the format:
`${AccountName} (${AccountId})`
In one case, there were two matches for "L1 Application" but one of them had a hyphen in the account name, which caused it not to match.
I wanted a simple way to sanitize the filter candidate before the match was performed. In my case, I have it remove all non-alphaNumeric characters, like so:
As a result, it now matches both results, as expected (see image above).
Others could theoretically use this function to do even more, such as modify what is matched on (e.g., starts-with could easily be performed by returning filter candidates that contain starting parts only, and this function could be rotated between a set of possible filter candidate generators depending on the search mode.)
see also: #803 #408