Question: This is the program Pearl. For the following, write one value for the variable on the left that will result in a successful regular expression

This is the program Pearl. For the following, write one value for the variable on the left that will result in a successful regular expression match:

a) $country =~ m/.*nd$/

I.e., if $country is ________________, this regular expression match would return true. $country = __________________

b) $poss =~ m/'s$/

$poss = ___________________

c) $var1 =~ m/[AaEeIiOoUu]{2}[^AaEeIiOoUu]{2}/

$var1 = _________________

d) $var2 =~ m/^#[^#]/

$var2 = _________________

e) $hecks =~ m/[A-F0-9][A-F0-9][A-F0-9]+/

$hecks = _________________

f) $pw =~ m/[^A-Za-z][0-9]+[A-Z][!?+=]*[a-z]+/

$pw = _________________

g) $someone =~ m/^Bu(bb|dd)(a|y)$/

$someone = _________________

h) $animal =~ m/^\w{6}$/ (\w is any word character.)

$animal = _________________

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!