PHP Terms Regular Expressions POSIX Brackets


- Info:

- Square brackets [] are used to represent a set or range of characters like: [abcA-Z09]

Range is defined by using '-' between characters represeting start and end of range.

Set is defined by simply entering characters or ranges.

Single brackets can contain multiple sets and ranges.

- Curly brackets () are used to defined exact sequence of characters like: (abc).








Represents any digit.

(Range of digits between 0 and 9)



Represents any lowercase letter.

(Range of letters between a and z)



Represents any uppercase letter.

(Range of letters between A and Z)



Represents any letter.

(Ranges of letters between A-Z and a-z)



Represents any digit or letter.

(Ranges of letters and digits)



Represents A, D or f letter.

(Set of characters)



Represents characters 4, 5, D, g, h and any character in the range d-t.



Represents exact sequence of charcters bc.



Represents exact sequence bc or 09 or any charactes from a-z.



Matches any string NOT containing any of the characters from a-z and A-Z.



Matches any string NOT containing any of the A, D or f letters.