Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Implement true "regex" support. #21

Open
tfuda opened this issue Jan 20, 2016 · 6 comments
Open

Implement true "regex" support. #21

tfuda opened this issue Jan 20, 2016 · 6 comments

Comments

@tfuda
Copy link
Contributor

tfuda commented Jan 20, 2016

Currently the two options -regex.for.selecting.source.classes.for.code.coverage.computation and -regex.for.selecting.test.classes.to.execute can be used to specify a comma separated list of patterns for selecting classes. The patterns support simple wildcard substitution and are converted into SOQL LIKE clauses. For example the pattern Test would be converted into WHERE Name LIKE '%Test%'. This is technically not true regex pattern matching. In order to support true regex pattern matching, I think you would have to query all Apex classes in the specified namespace and then iterate through the result set, and then use the Java Pattern and/or Matcher classes to see if the class names match the specified regex.

@pmedapuram
Copy link
Collaborator

Here (refer to the comment at the bottom) is the reference to the use case provided by @tfuda .
Thank you @tfuda

@adarsh-ramakrishna-sfdc
Copy link
Contributor

Implementing the 'true' regex support would require finding a way to honor the regex patterns in the soql queries along with using the matching logic as mentioned by @tfuda . This will take more time to implement and unfortunately we don't have the bandwidth for this. However we would welcome the community to help and contribute to this enhancement request.

@aabrego
Copy link

aabrego commented Jan 19, 2017

I see some scenarios where the true REGEX support can become very useful. I will start working on this one step at a time ...

@vamshi-sfdc
Copy link
Contributor

@aabrego have you had a chance to look into this? Please let us know

@KThompso
Copy link

Has there been any movement on this issue? I have a use for this feature and would be willing to provide support if it's being worked on -- or implement it if it's not.

@aabrego
Copy link

aabrego commented Oct 23, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants