Short for regular expression, a regex is a string of text that lets you create patterns that help match, locate, and manage text.
Examples
Wildcard search in array with regex in PHP
$array = array('Michael','Marian','Martina');
$matching_letters = 'ri';
$array = preg_grep("/{$matching_letters}/i", $array);