in reply to Re: Parse a large string
in thread Parse a large string
Consider what happens with the following string (disregarding any speeling misadventures errors and grammatical):
Nullamie a orci. Nullam quis augue. Aliquam lacinia tempus Praugue.
It is considered good practice to avoid using .* and .+ - they tend to be greedier than you often intend. Very often you are better to use a negated character class: [^.]+ would help a lot in this case. Also the word break anchor \b will help get intended behavior.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Parse a large string
by Marshall (Canon) on Mar 11, 2009 at 18:57 UTC |