lib/search/regex.c: use [] to get char in string.