User Tools

Site Tools


preg_replace

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

preg_replace [2019/12/17 12:13] (current)
Line 1: Line 1:
 +====== 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)