Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

add a grep() method to the search class #594

Closed
pascalchevrel opened this issue Jan 19, 2016 · 1 comment
Closed

add a grep() method to the search class #594

pascalchevrel opened this issue Jan 19, 2016 · 1 comment
Assignees

Comments

@pascalchevrel
Copy link
Member

@pascalchevrel pascalchevrel commented Jan 19, 2016

Small note to add a utility grep() function to our search class. Because almost every time we prepare a regex it is to grep data into it so we end up with code such as:

$filtered_strings = preg_grep($search->getRegex(), $source_strings);

And this would be shorter and more readable IMO:

$filtered_strings = $search->grep($source_strings);
@pascalchevrel
Copy link
Member Author

@pascalchevrel pascalchevrel commented Jan 28, 2016

We are having an l10n hackathon mid-February and we will have a table with at least 4 people working on Transvision. I am putting that bug in the backlog of bugs to fix for the event.

MatonAnthony added a commit to MatonAnthony/transvision that referenced this issue Feb 12, 2016
MatonAnthony added a commit to MatonAnthony/transvision that referenced this issue Feb 13, 2016
…->getRegex(), ` by `$search->grep(`

This doesn't work yet
MatonAnthony added a commit to MatonAnthony/transvision that referenced this issue Feb 13, 2016
…->getRegex(), ` by `$search->grep(`

This doesn't work yet

Test is now fixed
MatonAnthony added a commit to MatonAnthony/transvision that referenced this issue Feb 13, 2016
…->getRegex(), ` by `$search->grep(`

This doesn't work yet

Test is now fixed

Typo fixed
pascalchevrel added a commit that referenced this issue Feb 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.