Php

String Functions

$pos = strpos($haystack, $needle);    //returns FALSE on not found

$array = explode($delimiter, $string);

$string = implode($glue, $pieces);

Regular expressions

$str_or_array = preg_replace('/[^0-9]/', '', $str_or_array);

$int = preg_match('/([0-9]{3})-/', $subject, $matches);
//returns: 1 if the pattern matches, 0 if not, or FALSE on error
//$matches[0] = matched full pattern, $matches[1] = matched first subpattern \1, ...