
Larry C. answered 04/06/19
Computer Science and Mathematics professional
Other than writing a fairly complicated VBA function to do it, not sure it's possible in Word. However, are you limited to only using Word? If not, look into downloading and using Notepad++. It's free to install and use and had plugins that understand a plethora of programming languages, including PHP.