02.06.2013 Views

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

312<br />

CHAPTER 9 ■ PERFORMING FORM VALIDATION WITH REGULAR EXPRESSIONS<br />

■ Note You can read more about PCRE at<br />

http://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions.<br />

Setting up a Test File<br />

To learn how to use regexes, you’ll need a file to use for testing. In the public folder, create a new file<br />

called regex.php <strong>and</strong> place the following code inside it:<br />

<br />

<br />

<br />

<br />

Regular Expression Demo<br />

<br />

em {<br />

background-color: #FF0;<br />

border-top: 1px solid #000;<br />

border-bottom: 1px solid #000;<br />

}<br />

<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!