January 2020
Intermediate to advanced
532 pages
13h 31m
English
Given the powerful features of a try-catch block, it is sometimes tempting to handle all negative scenarios with Exception types. In practice, we want to be very clear about what is truly an exception and what is a normal negative case.
We can turn to the match function as an example. The match function from the Base package can be used to match a regular expression against a string. If there is a match, then it returns a RegexMatch object, which contains the captured results. Otherwise, it returns nothing. The following example illustrates this effect:

The first match function call returned a RegexMatch object ...
Read now
Unlock full access