Regular Expressions: An Introduction
Published: January 12, 2004
User Rating: 8.9 (274 votes)
Alternate, as the name suggest allows you to define an alternate in the patter. Or in simple terms it would mean "find this or that or ....".
Alternate or alternates are defined by seperating them with a pipe | character. This would become more clear from taking a few examples.
Sub-patterns are patterns within pattern. We 'll discuss them later, but I just wanted to mention them here so that there is no confusion
Taking few more examples ...