Web Design Tutorials and Articles: Regex Groupings in Perl

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

Regex Groupings in Perl

Regular Expressions in Perl for the Novice – Part 4 Introduction This is the fourth part of my series, Regular Expressions in Perl for the Novice. In this part of the series, I explain regex Grouping and Capturing in Perl. 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 (guitarist is good)/ “guitarist is... Sign in to see full entry.

Previous: More Regular Expression Patterns in Perl - New Entries - Next: Regex Modifiers in Perl

Headlines (What is this?)