Since I have almost no knowledge about regular expressions, I am going to learn it from the very basic. Tom Igoe’s Understanding Network class also requires some regex writings when pulling data from command lines.
I was reading this article as a learning material:
Also playing Regex Golf as quizzes
I realizes it is good to break down(write) the pattern and solve it step be step
. any character except new line
\\b start or end of a word, word boundary
\\w a letter, number, under-dash, (east asian) character.
\\d a digit, number. = [0-9]
\\s a space, tab, new line divider
^ start of a string (matching search)
$ end of a string (matching search)
if searching a meta-character, add \\ in front of it.
Quantifiers
* 0 or more times