Let D be any digit, and N be any digit except 0. Which of the following is a regular expression for all possible strings

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Let D be any digit, and N be any digit except 0. Which of the following is a regular expression for all possible strings

Post by answerhappygod »

Let D be any digit, and N be any digit except 0. Which of thefollowing is a regular expression for all possible strings ofcharacters which represent positive real numbers? A positive realnumber must have digits before and after the decimal point, andmust start with 0 only if it is the only digit before the decimalpoint (i.e. 1.5, 0.0, 0.03 are all in the language, but 3, 000.05and 02.6 are not).
(0+ND*).DD*
0N*.D*+D*.D*
(0+ND*).D*
0.D*+ND*.D*
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply