adplus-dvertising
frame-decoration

Question

Given segment of code.
What does the symbol /z does?
$string1 = "Hello\nWorld\n";
if ($string1 =~ m/d\n\z/) {
  print "$string1 is a string ";
  print "that ends with 'd\\n'.\n";
}

a.

changes line

b.

matches the beginning of a string

c.

matches the end of a string

d.

none of the mentioned

Answer: (c).matches the end of a string

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Given segment of code. What does the symbol /z does?

Similar Questions

Discover Related MCQs

Q. Conversion of a regular expression into its corresponding NFA :

Q. Which among the following is not a UNIX command for regular expressions?

Q. What is the significance of $ used in regular expression in UNIX?

Q. Generate the regular expression to match blank lines

Q. For the given syntax of sed, which among the following is not a correct option?
General syntax of sed: /pattern/action

Q. What does grep do in UNIX?

Q. State true or false:
Statement: A regular expression is a sequence of characters that represent a pattern.

Q. Which of the following options support the given statement?
Statement: A regular expression could be a fixed word or describe something like more general.

Q. What does the following segment of code does?
grep -i man heroes.txt

Q. What does “X?” do regular expression operator?

Q. Which of the following does not support regular expressions?

Q. Lexemes can be referred to as:

Q. If the lexical analyser finds a lexeme with the same name as that of a reserved word,it _________

Q. The methodology to show an error when the analyzer faces a keyword over an user’s input is based on:

Q. State true or false:
Statement: A lexical analyzer reads the source code line by line.

Q. The scanner outputs:

Q. The phase of compilation which involves type checking is:

Q. Which among the following is not a tool to construct lexical analyzer from a regular expression?

Q. A program that performs lexical analysis is termed as:

Q. Lexers and parsers are not found in which of the following?