[ticket/11828] Fix greedy operators in lexer

Use lazy operators and use stricter validation

http://tracker.phpbb.com/browse/PHPBB3-11828