Web Design Tutorials and Articles: Grouping in JavaScript String Regular Expressions

By Chrysanthus - About Me - E-mail this page - Add to My Favorites - Add to Blog List - See other blogs in Computers & Internet

Wednesday, April 8, 2009

Grouping in JavaScript String Regular Expressions

JavaScript String Regular Expressions – Part 4 Introduction This is the fourth part of my series JavaScript String Regular Expressions. You can actually group bits of a regular expression and do something with it. That is what this part of the series is about. Groupings We can use parenthesis to group characters in a pattern. Consider the following pattern: /The (guitarist)/ “guitarist” is in parenthesis. The parentheses form a group, which has the text: “guitarist”. Consider the following: /The... Sign in to see full entry.

Previous: More JavaScript String Regular Expression Patterns - New Entries - Next: Flags in JavaScript String Regular Expressions

Headlines (What is this?)