Quiz
-
If a substring is not
found in a string, the FIND function returns which value?
-
Given the following
DATA step, what is the value of USNum and WordNum?
data work.Count;
Text='AUSTRALIA, ENGLAND, CANADA, AUSTRIA, ITALY, US, SPAIN';
USNum=count(Text,'CANADA');
WordNum=countw(Text);
run;
-
Which program would
correctly generate two separate lagged variables for each observation?
-
data work.samp1;
set work.lag0;
y=lag1-lag2(item);
run;
proc print data=work.samp1;
run;
-
data work.samp2;
set work.lag0;
y=lag2(item);
run;
proc print data=work.samp2;
run;
-
data work.samp3;
set work.lag0;
x=lag1(item);
y=lag2(item);
run;
proc print data=work.samp3;
run;
-
data work.samp4;
set work.lag0;
y=lag1(item);
y=lag2(item);
run;
proc print data=work.samp4;
run;
-
What is the value of
the column Position?
Position=prxmatch('/Dutch/','Sawyer Dutch Kenai');
-
Which program correctly
searches a string for a substring and returns the position of a substring?
-
data _null_;
position=prxmatch('/mind/', 'Learning never exhausts the mind.');
put position=;
run;
-
data _null_;
position=prxchange('/mind/', 'Learning never exhausts the mind.');
put position=;
run;
-
data _null_;
position=prxparse('/mind/', 'Learning never exhausts the mind.');
put position=;
run;
-
data _null_;
position=findw('/mind/', 'Learning never exhausts the mind.');
put position=;
run;
-
Which program correctly
changes the order of first and last names?
-
data work.reverse;
set certadv.reversedNames;
name=prxmatch('/name/', name);
run;
-
data work.reverse;
set certadv.reversedNames;
name=prxchange('s/(w+),(w+)/$2 $1/', -1, name);
run;
-
data work.reverse;
if _N_=1 then do;
pattern='/name';
name=prxparse(pattern);
end;
set certadv.reversedNames;
run;
-
-
Perl regular expressions
in the PRXMATCH function must start and end with a delimiter.
-
Which Perl regular expression
replaces the string ABC with the string ABC87?
Last updated: October 16, 2019
..................Content has been hidden....................
You can't read the all page of ebook, please click
here login for view all page.