jasonc Posted June 15, 2017 Share Posted June 15, 2017 I wish to highlight the special characters that fall within the following range x00 to x7FPlease can someone advise how could I do this ? Link to comment Share on other sites More sharing options...
Jacques1 Posted June 15, 2017 Share Posted June 15, 2017 You couldn't be more cryptic. First off: What on earth are you trying to achieve? I don't mean “I want a regex” but the overall goal. Your input is what? ASCII? And with “range x00 to x7F” you mean the control characters? What about them? Look, we're no mind readers. In your head, this may all make sense, but on the outside, it really doesn't. Link to comment Share on other sites More sharing options...
jasonc Posted June 15, 2017 Author Share Posted June 15, 2017 I wish to read all data from a DB table and display it. Displaying each record, if there is a character is between x0 and x7F then wrap it in a span that will highlight it using CSS. Link to comment Share on other sites More sharing options...
jasonc Posted June 15, 2017 Author Share Posted June 15, 2017 can this be done using preg_replace? Link to comment Share on other sites More sharing options...
Jacques1 Posted June 15, 2017 Share Posted June 15, 2017 You haven't answered the questions. What is the purpose of this exercise? The control characters are by definition unprintable. How do you “highlight” something which has no graphical representation? Except for newlines and tabs, there's literally nothing on the screen. What is the input encoding? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.