1.

Which of the following symbols are used for matching a pattern at specified locations?(a) *(b) ^(c) $(d) ^ and $This question was posed to me in an interview for internship.My enquiry is from grep command topic in chapter Filters using Regular Expressions of Unix

Answer»

The correct option is (d) ^ and $

Explanation: Most of the REGULAR EXPRESSION character are USED for matching PATTERNS, but there are two symbols that are used for matching PATTERN at beginning or end of a line. These symbols are ^ and $.



Discussion

No Comment Found

Related InterviewSolutions