Online
 
Thursday, 20 November 2008
 
 

Perl-Compatible Regular Expressions (PCRE) | Print |  E-Mail
 

Perl Compatible Regular Expressions (PCRE) are much more powerful than their POSIX counterpartsand consequently, also more complex and difficult to use.

PCRE adds its own character classes to the extended regular expression rules that we saw earlier:

  • \w represents a "word" character and is equivalent to the expression [A-Za-z0-9].

  • \W represents the opposite of \w and is equivalent to [^A-Za-z0-9].

  • \s represents a whitespace character.

  • \S represents a nonwhitespace character.

  • \d represents a digit and is equivalent to [0-9].

  • \D represents a nondigit character and is equivalent to [^0-9].

  • \n represents a newline character.

  • \r represents a return character.

  • \t represents a tab character.

 

 

 

 

 

 

 

 

 

 



This entry was posted on . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a comment. Tags: Simple PHP, Pear, Easy PHP, PHP Tutorial, PHP MySQL, XSLT, Sap Tutorial, CSS Tutorial, XSL FO Java, SQL Tutorial.
Users' Comments (0)

Comment an article
  Name
  E-mail
   Title
Available characters: 4000
 Notify me of follow-up comments
This image contains a scrambled text, it is using a combination of colors, font size, background, angle in order to disallow computer to automate reading. You will have to reproduce it to post on my homepage
Enter what you see:

No comment posted

Jumbo Coklat
 
Top! Top!