// If the other text is optional: preg_match("/^Hello.*Bye$/","Hello[some other text]Bye")) // If the other text is required: preg_match("/^Hello.+Bye$/","Hello[some other text]Bye")) // If the other text must be at least five characters: preg_match("/^Hello.{5,}Bye$/","Hello[some other text]Bye"))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)