0 11

BIT301 ยท 0 ยท 5 marks

Write a PHP program to illustrate string patterns using regular expression.

Write a PHP program to illustrate string patterns using regular expression. [5]

Web Technology IIChapter 5: String Processing and Regular ExpressionsString patterns and regular expressions

Function Purpose ------ pregmatch() Match a pattern (returns true/false) pregmatchall() Find all matches pregreplace() Replace matched pattern pregsplit() Split string by pattern --- --- --- Pattern Meaning ------ ^ Start of string