
| Contents |
|||||||||||||||
| [an error occurred while processing this directive] |
6.2.6 The Anchor CharactersSometimes, we want to apply the regular expression from a defined point. In other words, we want to anchor the regular expression so it is not permitted to match anywhere in the string, just from a certain point.
The anchor operators allow us to do this. When we start a regular
expression with a
We can also use the In most cases, you will want to either anchor a regular expression to the start of the string, the end of the string, or both. Using a regular expression without some sort of anchor can also produce confusing and strange results. However, it is occasionally useful. |