forked from golang/glog
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
logcheck: fix detection of invalid * regexp in filter
Extending the user-supplied regular expression to match the entire string by adding ^ and $ turned invalid regular expressions like * into valid ones (`^*$`) and thus didn't flag them as error. It's better to compile the string exactly as supplied by the user (better error message, properly detects this case) and then checking later whether the entire string was matched.
- Loading branch information
Showing
2 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters