View Single Post
Old 06-07-2011, 04:13 AM   #5
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Ginnia View Post
Thanks for responding, Manichean. If I could understand what the ".+" and the "[^_]+" means, it would help me noodle thru this I think.
".+" means "one or more of any character". "[^_]+" means "one or more of anything except an underscore."

Decoding this, the + means "one or more of the pattern preceding it". In the first case the pattern is ".", which means any character. In the second case the pattern is "[^_]", which is a "character class" pattern meaning "any character that is not an underscore". If you leave the "^" out of the character class, then it would mean "any character that is an underscore", or exactly the same as "_+".

The tutorial gives more information on character classes.
chaley is offline   Reply With Quote