Which symbol is used for finding the length of the string?

Lâm Phung

New member
Which symbol is used for finding the length of the string?
A. .
B. *
C. .*
D. .*.
 
Answer: c
Explanation: The length of the string can be extracted using .* . This regular expression signifies to expr that it has to display the number of characters matching the pattern i.e. the length of the entire string. For example,
Code:
$ expr “123hoidap” :  ‘.*’
10
 

Tìm kiếm

Back
Top