Perl Compatible Regular Expressions (PCRE)

PCRE is the library that supports regular expressions in PHP. It offers functions to search and replace in strings, and arrays of strings.

<?php

    preg_match('/PHP is (.*?)\./', 'PHP is fantastic.', $r);

    print $r[1]; // fantastic

?>

Documentation

See also PCRE - Perl Compatible Regular Expressions.

Related : Regular Expression