summaryrefslogtreecommitdiffstats
path: root/src/match.c
Commit message (Collapse)AuthorAgeFilesLines
* inspect: Don't assume number of captures in match functionsMatthew Booth2011-10-191-30/+13
| | | | | | | | | | | | | | | | It is possible for the pcre library to return a variable number of captures for a single regular expression. e.g.: ^/dev/(cciss/c\d+d\d+)(?:p(\d+))?$ This will return either 1 or 2 captures depending on whether the device has a partition suffix. The current match wrappers don't allow for this, and require that a predictable number of matches are returned. This change updates match, match1, match2, and match3 to ignore the specific number of matches returned. Instead, any returned captures are assigned to the given arguments, and any remaining arguments are set to NULL. (cherry picked from commit f5c9f0e9ee1729b1260cef3e51ca91936e1868c4)
* Require PCRE library.Richard W.M. Jones2011-07-261-6/+0
| | | | | This library is widely available in distros. (cherry picked from commit 41cd0e302d6554facd6b9f7daaa78304361efaef)
* build: include <string.h> for src/match.c's use of strlenJim Meyering2011-06-101-0/+1
|
* inspect: Move shared PCRE match functions to separate file.Richard W.M. Jones2011-04-131-0/+127
This is just moving code around.