Check if a string value looks like a regex pattern. */
| 2524 | |
| 2525 | /* Check if a string value looks like a regex pattern. */ |
| 2526 | static bool looks_like_regex(const char *s) { |
| 2527 | if (!s) { |
| 2528 | return false; |
| 2529 | } |
| 2530 | return strstr(s, ".*") || strstr(s, ".+") || strchr(s, '[') || strchr(s, '(') || |
| 2531 | strchr(s, '|') || strchr(s, '^') || strchr(s, '$'); |
| 2532 | } |
| 2533 | |
| 2534 | /* Check inline property filters. |
| 2535 | * Values that look like regex patterns are matched with POSIX ERE; |
no outgoing calls
no test coverage detected