regular expression

C

ccwork

Hi,
I would like to understand the regular expression more and there
are something questions that help someone could help?

1) If the text is "ababcdcdef" and I search for pattern (ab|cd)*, what
is the matched string?
2) If the text is "ababcdcdef" and I search for pattern (zz|yy)*, what
is the matched string?
3) If the text is "ababcdcdef" and I search for pattern ((ab)?|(cd)?),
what is the matched string?
4) If the text is "ababcdcdef" and I search for pattern ((ab)*|(cd)*),
what is the matched string?
5) If the text is "ababcdcdef" and I search for pattern ((zz)?|(yy)?),
what is the matched string?
6) If the text is "ababcdcdef" and I search for pattern
((ab)?|(cd)?)+, what is the matched string?
7) If the text is "ababcdcdef" and I search for pattern
((ab)*|(cd)*)+, what is the matched string?
8) If the text is "ababcdcdef" and I search for pattern
((zz)?|(yy)?)+, what is the matched string?
 
P

Purl Gurl

ccwork wrote:

(snipped)
I would like to understand the regular expression more and there
are something questions that help someone could help?
If the text is....
and I search for pattern....
what is the matched string?....

(snipped eight repetitions)


Have you considered reading your test script results?


Purl Gurl
 
J

John Bokma

ccwork said:
Hi,
I would like to understand the regular expression more and there
are something questions that help someone could help?

You mean: I have homework and am a bit lazy?

[snip]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,149
Latest member
Vinay Kumar Nevatia0
Top