Posts

Showing posts from October, 2005

Regular Expression

Meta Characters “ [ ] “ Specifies a Character class. [ aefg ] à Matches any of the character a, e, f, g. [ a-f ] à Matches any of the character in the range a to f. [ mkl $] à Matches any of the character including $. Meta characters inside character class is stripped off its special nature. [^a-z] à Complementing; Matches all the characters other than Lower case alphabets. “ \ “ Gives special meaning to various characters. Also used to escape all the meta characters from their special nature. \d à matches any decimal digit; this is equivalent to the class [0-9]. \D à matches any non-digit character; this is equivalent to the class [ˆ0-9]. \s à Matches any whitespace character; this is equivalent to the class [ \ t\n\r\f\v]. \S à matches any non- whitespace character; this is equivalent to the class [ˆ\t\n\r\f\v]. \w à matches any alphanumeric character; this is equivalent to the class [a-zA-Z0-9]. \W à matches any non-alphanumeric character; this is equivalent to