Thread: Regex examples
View Single Post
Old 07-27-2017, 05:24 PM   #536
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,934
Karma: 207182180
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by JSWolf View Post
[0-9]*
Matching a digit 0 or more times doesn't really make sense when there's never going to be no digit (though it will still work in this instance). Matching one or more digits [0-9]+ makes more logical sense. And \d+ is even simpler, since it's the exact same thing, but shorter and easier to type.
DiapDealer is offline   Reply With Quote