| Contents | Up | Previous | Next |
Regular expressions are one of the most powerful features of perl, but are also one of the most difficult to understand. Don't let that fact discourage you: they are definitely worth your time.
Basically, a regular expression tells the interpreter to search a string for a pattern. The pattern can be a simple one like the word "hello" or a complex one, such as the word "hello" followed by as many instances of the word "one" as possible, followed by the word "triple". The latter will be written as hello(one)*triple inside a regular expression.
The perl operators allow you to do three things with a regular expression:
Some perl functions such as split and grep (which will be covered later) can utilize regular expressions to do other tasks.
| Contents | Up | Previous | Next |