Question

Give the best regular expression for each of the following in / delimited form. For example, the ...

Give the best regular expression for each of the following in / delimited form. For example, the regular expression to find a string that is a single “a” would be /^a$/

You may NOT use the negation syntax in the format (?!)

1. Find a regular expression that will find strings that start with anything but the empty string and contains the string apple.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
The regular expression is: 
^(?!\s*$).+a{1}p{2}l{1}e{1}

The first half of the expression will check for the string is empty or not and the second half of the expression would check for the word "apple".

Add a comment
Know the answer?
Add Answer to:
Give the best regular expression for each of the following in / delimited form. For example, the ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT