@http://(www.)?

Posted by: Pdfprep Category: 70-483 Tags: , ,

You write the following method (line numbers are included for reference only):

You need to ensure that the method extracts a list of URLs that match the following pattern:

@http://(www.)?([^.]+).com;

Which code should you insert at line 07?

A . Option A
B . Option B
C . Option C
D . Option D

Answer: C

Explanation:

The MatchCollection.GetEnumerator method returns an enumerator that iterates through a collection.

Note:

The MatchCollection Class represents the set of successful matches found by iteratively applying a regular expression pattern to the input string.

Incorrect:

Not B: The ICollection.SyncRoot property gets an object that can be used to synchronize access to the ICollection.

Reference: MatchCollection.GetEnumerator Method

https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.matchcollection.getenumerator(v=vs.110).aspx

Leave a Reply

Your email address will not be published.