Regexp bug?

Regexp bug?

by David Willington -
Number of replies: 1
Dear All

I've never submitted a bug - hope this doesn't get anyone on a wild goose chase. So far all the 'bugs' I've found have been my own fault / lack of understanding. Nonetheless here goes

I've got an answer to a regexp question. The question is

'What digits make up the number seventy?'

The answers I've given are
70
7 ?0

The alternate answers I'm shown are below - the zero is lost. If I replace the zero with a 1 (ie 7 ?1) then it works.


70
1 7 ?0
7
7


I'm on moodle 1.7, php5.1.2

All the best

David Willington
Average of ratings: -
In reply to David Willington

Re: Regexp bug?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi David,
Thanks for your bug report. You are quite right, in your regular expression answer, the zero disappears whereas any other figure stays. Since I hardly ever work with numbers but with text, I had not come across this bug.
I'll look into it.
Joseph