User Tools

Site Tools


Sidebar

Software

preg_replace

preg_replace


preg_replace - Perform a regular expression match

Description

preg_replace("$pattern","$replacement","$subject")

This function returns a string

Parameters

$pattern
The pattern to search for, as a string

$replacement
The string string to replace

$subject
The input string

Examples

$regex1=preg_replace("hello","cool","hello world")
alert($regex1)
preg_replace.txt · Last modified: 2019/12/17 12:13 (external edit)