Perform A Regular Expression Search And Replace

Updated about 8 yrs, 6 mths ago (May 4, 2016). Know a better answer? Let me know!

Perform a regular expression search and replace

This page lets you perform a PHP perl-compatible regular expression find and replace. I hope you find it useful.

Perform a regular expression search and replace

Searches subject for matches to pattern and replaces them with replacement using PHP’s preg_replace function. For more information about the syntax, see PHP Regular Expressions (Perl-Compatible)

1: Pattern

/ /

2: Replacement

3: Subject

preg_match

int preg_match(string $pattern, string$subject [, array&$matches [, int$flags = 0 [, int$offset = 0 ]]])

pattern:

subject:

flags: , offset:

matches:

Array
(
)

More Information

Information gathered from the following:

 

Updated about 8 yrs, 6 mths ago (May 4, 2016). Know a better answer? Let me know!

Related categories [coloured].

Comment on this article (no HTML, max 1200 characters):