Appendix. Regular expressions

In JavaScript, a regular expression is a JavaScript object that describes a pattern of characters. It’s used to match strings or parts of strings and for search and replace operations. jQuery uses regular expressions extensively for such diverse applications as parsing selector expressions, determining the type of browser in use, and trimming whitespace from text.

The use of regular expressions in JavaScript is an important part of using the language effectively. Regular expressions appear in many of the plugins in this book to test values or to break up strings into their component parts. You should be familiar with their syntax and usage patterns.

Online resources

More information on, and examples ...

Get Extending jQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.