MemoryRefresh!

Egrep / Character classes     Character classes



Questions Answers 0%

Pages   0 from 15
Questions   0 from 20

Reset


Match any one of serveral characters.
gr[ea]y means to find g, r, followed either an e or an a, followed by y. Notice how outside a class, literal characters (g, r) have an implied and-then between them. It's completely opposite inside a character class. The implication is or
Dash
Within a character class metacharacter "-" (dash) indicates a range of characters <H[1-6]> is identical to <H[123456]>. Multiple ranges are fine: [0-9A-F] You can freely combine ranges with literal characters: [0-9a-z_!.?] Note that a dash is a metacharacter only within a character class, otherwise it matches the normal dash character.
1) Match a range of characters




2) Character class [ae] means







Match any one of serveral characters.
gr[ea]y means to find g, r, followed either an e or an a, followed by y. Notice how outside a class, literal characters (g, r) have an implied and-then between them. It's completely opposite inside a character class. The implication is or
Dash
Within a character class metacharacter "-" (dash) indicates a range of characters <H[1-6]> is identical to <H[123456]>. Multiple ranges are fine: [0-9A-F] You can freely combine ranges with literal characters: [0-9a-z_!.?] Note that a dash is a metacharacter only within a character class, otherwise it matches the normal dash character.

References









Programming

Php
   
Regex
   
MySQL
   
Css
   
jQuery
   
Git
   


References