title: Replacing the strings in text with values of the key in HashMap
body: <p>The main goal is to replace some words in the string with the values in the hashmap for the key (key are the words in the text). The keys are in different format.
  For eg: 
  <strong>main text:</strong> "Lookahead and lookbehind, collectively called lookaround, are [0-23] assertions"
  <strong>hashmap:</strong> {Lookahead=test1,lookbehind=test2,lookaround=test3,[0-23]=newvalue}
  <strong>expected output:</strong> 
  "test1 and test2 , collectively called test3, are newvalue assertions"</p>
  
  <p>I am able to make the dictionary but the replacement part is where I need help. I am not able to replace the [0-23] like keys. as replaceAll doesnot consider - , [ and ].</p>