It seemed as though you wanted to only match those charactors in the set. If you don't add the ^ (beginning of string) and $ (end of string), then the pattern could match only a section of the string, and not the whole thing.
Please login or register to view this content. Registration is FREE | Freelance PHP solutions for small to midsized projects | Please login or register to view this content. Registration is FREE
Good clarification, phpknowhow. I hardly ever use the ^ and $ symbols in regexs b/c I'm not that great at them in the first place. I really appreciate your explanation as to why using them benefits the expression.
It seemed as though you wanted to only match those charactors in the set. If you don't add the ^ (beginning of string) and $ (end of string), then the pattern could match only a section of the string, and not the whole thing.