Check if a string value looks like a regex pattern. */
| 2992 | |
| 2993 | /* Check if a string value looks like a regex pattern. */ |
| 2994 | static bool looks_like_regex(const char *s) { |
| 2995 | if (!s) { |
| 2996 | return false; |
| 2997 | } |
| 2998 | return strstr(s, ".*") || strstr(s, ".+") || strchr(s, '[') || strchr(s, '(') || |
| 2999 | strchr(s, '|') || strchr(s, '^') || strchr(s, '$'); |
| 3000 | } |
| 3001 | |
| 3002 | /* Check inline property filters. |
| 3003 | * Values that look like regex patterns are matched with POSIX ERE; |
no outgoing calls
no test coverage detected