g1smd - 2:12 pm on Dec 15, 2012 (gmt 0)
The [.]+ doesn't match as there are no literal periods in the input. It would match test#.#test or test#.....#test with literal periods.
The [ ] denotes a character group, in this case [.] is looking for a single literal period. Usually, you use group syntax when there are multiple choices of character to match: [a-z] matches a single letter, [0-9] matches a single digit, [aeiou] matches a single vowel. The + in [x]+ matches "one or more" instances of any of the listed characters in the group.
You might decide to use .+ but that is also the wrong thing to use.
Using .+ would "eat" everything to the end, including the following # and everything after it. The pattern would be looking for another # after test(#)(test#test) - brackets show the matches.
Never use .* or .+ at the beginning or in the middle of a pattern. It is always ambiguous. Only ever use .* or .+ at the trailing end of a pattern, where it means "capture the remainder of the input".