Regular Expression. The type of pattern matching you do with sed or grep or Perl uses regexes.
There are whole books on regular expressions. I imagine most of us have some degree of familiarity, but this can be a very complex subject. Larry Wall (originator of Perl) hit the nail on the head when he said
Regexes aren't strings, they're programs. Or, rather, they're strings only in the sense that any piece of program is a string
So, in the Perl world, regex's will undergo a major transformation with Perl 6. Larry (a bit of a religious nut) describes the changes in Perl 6 as an Apocalypse. Don't get too worried: Larry promises
It is my fond hope that those who are fond of Perl 5 will be fonder still of Perl 6
But back to regexes. You'll find the gory details of Larry's thoughts on regexes, what's wrong, what needs to be changed, and more, at http://www.perl.com/pub/a/2002/06/04/apo5.html. If you use Perl, you'll want to read that. Again, Larry warns you:
Given all this, I need to warn you that this Apocalypse is going to be somewhat radical. We'll be proposing changes to certain "sacred" features of regex culture, and this is guaranteed to result in future shock for some of our more conservative citizens. Do not be alarmed. We will provide ways for you to continue programming in old-fashioned regular expressions if you desire. But I hope that once you've thought about it a little and worked through some examples, you'll like most of the changes we're proposing here.
If Larry's expository style isn't quite your cup of tea (I enjoy reading it, but not everyone agrees), you might try Perl 6 grammars and regular expressions for another view of the changes coming.
More Articles by Tony Lawrence - Find me on Google+
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar