I have a number say
a=ToString[2^554]
and a list of numbers
dp=ToString/@{863, 877, 881, 883, 887}
and I wish locate all instances of those numbers in the string “a” and change the text colour of those numbers to Red.
I have tried using Style and FontColor but the first StringReplace inserts Tildes either side of the replaced number, it then won’t save the replacement as a string so the second replacement and beyond fails, any help would be appreciated.
The following shows the tildes.
StringReplace[a, dp[[1]] -> Style[dp[[1]], FontWeight -> "Bold", Red]]
