Empresa activa
bool regular_expression_match(char* pattern, char* string) and pattern can contain kleene star.
Anónimo
Do you mean pattern can only normal characters or star? Will other special characters be included, e.g. '?', '+', '{}', '[]', etc.?
bool rep(char* pattern, char* string) { if ((pattern[0] == 0) && (string[0] == 0)) return 1; if ((pattern[0] == 0) || (string[0] == 0)) return 0; if (pattern[1] == '*') { return (match(pattern, string) && (rep(pattern+2,string) || rep(pattern,string+1))); } else { return (match(pattern, string) && rep(pattern+1, string+1)); } } bool match(char* pattern, char* string) { if (*pattern == '.') return 1; return (*pattern == *string); }
Sigue a tus empresas favoritas para estar al tanto de las últimas oportunidades y disponer de información de primera mano.
Recibe recomendaciones y actualizaciones personalizadas al iniciar tu búsqueda.