subject

Write a regular expression pattern that matches strings representing trains. A single letter stands for each kind of car in a train: Engine, Caboose, Boxcar, Passenger car, and Dining car. There are four rules specifying how to form trains. 1. One or more Engines appear at the front; one Caboose at the end. 2. Boxcars always come in pairs: BB, , etc. 3. There cannot be more than four Passenger cars in a series. 4. One dining car must follow each series of passenger cars. These cars cannot appear anywhere other than these locations. Here are some legal and illegal exemplars. EC Legal: the smallest train EEEPPDBBPDC Legal : simple train showing all the cars EEBB Illegal: no caboose (everything else OK) EBBBC Illegal: three boxcars in a row EEDBBC Illegal: more than four passenger cars in a row EEPPBBC Illegal: no dining car after passenger cars EEBBDC Illegal: dining car after box car Hint: my RE pattern was 16 characters.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 05:30, lolololol21
Cómo pongo un tomo de llamada sin pagar?
Answers: 1
image
Computers and Technology, 24.06.2019 07:00, janeliles
Why would a business likely use a java applet - to back up their data files for the business - to create a program that a customer can launch in their web browser - to create music on a powerpoint presentation - to organize files on their company directory
Answers: 3
image
Computers and Technology, 24.06.2019 17:00, yobanajk
Aman travel 200m towards east< br /> from his house then takes left< br /> to turn and moves 200 m north< br /> find the displacement & distance.< br />
Answers: 3
image
Computers and Technology, 25.06.2019 11:30, robertabenavidesq
Janet has created an original musical composition, recorded it on a cd and registered her work online. which law will protect her work from any kind of infringement? a. copyright b. trademark c. patent d. trade secret
Answers: 2
You know the right answer?
Write a regular expression pattern that matches strings representing trains. A single letter stands...

Questions in other subjects: