Write a regular expression that you could use with egrep that will find all entries in /usr/share/dict/words that have two punctuation marks that are not consecutive. Only write the regular expression.

Respuesta :

Answer:

Regular expression:

"^[^[^\w\s]|_]*[^\w\s]|_[^[^\w\s]|_]+[^\w\s]|_[^[^\w\s]|_]*$"

Explanation:

The regular expression has the following parts:

i) [^\w\s]|_ - expression to match any punctuation mark

ii) ^[^[^\w\s]|_] -

iii) *[^\w\s]|_ -

iv) [^[^\w\s]|_] -

v) +[^\w\s]|_ -

vi) [^[^\w\s]|_]*$" -

ACCESS MORE
EDU ACCESS