When trying to identify the text fragments enclosed in square brackets and replace the [] with empty string, we are getting the below null reference exception if the text fragment contains \r\n or \n or nbsp characters.
…...enclosed in square brackets and replace the [] with empty string, we...textFragment.Text.Replace("[", “”).Replace("]", “”); textFragment...