[ticket/11828] Fix greedy operators in lexer

Use lazy operators and use stricter validation

PHPBB3-11828
Merge pull request #1708 from EXreaction/ticket/11828

[ticket/11828] Fix greedy operators in lexer