BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Zend Exam 200-710 Topic 4 Question 75 Discussion

Actual exam question for Zend's 200-710 exam
Question #: 75
Topic #: 4
[All 200-710 Questions]

Which sentence describes the following regular expression match?

preg_match('/^\d+(?:\.[0-9]+)?$/', $test);

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Chauncey
2 months ago
Haha, D) is a classic answer choice to mess with us. No way that regex matches 'any string'.
upvoted 0 times
...
Sommer
2 months ago
I'm not sure, but I think it could also be A) It matches float numbers with thousand separators, as the regular expression includes a period for decimal numbers.
upvoted 0 times
...
Hana
2 months ago
Hmm, I'm not so sure. The \\d+ could also match integers, right? I'll go with C) just to be safe.
upvoted 0 times
Melda
24 days ago
I'm not so sure, I'll go with C) just to be safe.
upvoted 0 times
...
Deandrea
30 days ago
I agree, the \\d+ matches integers as well.
upvoted 0 times
...
Jacquline
1 months ago
I think it matches float numbers without thousand separators.
upvoted 0 times
...
...
Noel
2 months ago
I agree with Rosalia, because the regular expression allows for decimal numbers without thousand separators.
upvoted 0 times
...
Flo
2 months ago
I think it's B as well. The \\d+ matches one or more digits, and the optional \\.[0-9]+ part matches the decimal part.
upvoted 0 times
Scarlet
1 months ago
I'm not sure about this one. Can someone explain why it's not A or C?
upvoted 0 times
...
Elenor
1 months ago
Yes, I agree. It definitely looks like it's matching float numbers without thousand separators.
upvoted 0 times
...
Gail
1 months ago
I think it's B as well. The \\d+ matches one or more digits, and the optional \\.[0-9]+ part matches the decimal part.
upvoted 0 times
...
...
Corrina
2 months ago
B) definitely. That regex checks for float numbers with no thousand separators.
upvoted 0 times
Stephane
1 months ago
E) It does not match anything
upvoted 0 times
...
Edmond
1 months ago
C) It matches binary integer numbers.
upvoted 0 times
...
Rory
2 months ago
B) It matches float numbers without thousand separators.
upvoted 0 times
...
Yvette
2 months ago
A) It matches float numbers with thousand separators.
upvoted 0 times
...
...
Rosalia
2 months ago
I think the answer is B) It matches float numbers without thousand separators.
upvoted 0 times
...

Save Cancel