Matching Punctuations and Symbols

Write a javascript code to match a word.

Output :