My approach would be to use regex to sanitize the input to ensure that
the pattern or characters are permissible. If the regex string passes
the test, your application can then test the string to see if it
equals an exacts string value.
The regex here would test for a string that must only contain
characters, numbers, a period, and ( ). If true, then the app can
proceed to test an exact string value of: "A. How To Refer the Manual
(Refer image 1)". Much easy to do it this way.
Maybe others can help you with the exact regex to test for the "safe"
characters you require - I'm still not that adept in it - but there
are regex Apps that can help you build such regex test.
~Patrick