Quantifier Syntaxes : String Replace « String « PHP






Quantifier Syntaxes



Quantifier   Min        Max               Range

{m}          m          m                 Exactly m times

{m, x}       m          x                 At least m times, no more than x

{m,}         m          Infinite          At least m times or more

*            0          Infinite          Zero or more times

?            0          1                 Zero or one times

+            1          Infinite          One or more times

           
       








Related examples in the same category

1.str_replace: @ (at)
2.Replacing a Pattern with a Found String
3.Replace the tag content without getting rid of any attributes
4.String replace with Regular Expressions
5.What happens when multiple instances of the search string overlap?
6.String replace: index and value