Start a new topic

Adding default pre-defined text highlighting templates

Hi all,


Objective: I would like to share an idea to RoyalTS to add some default pre-defined Text Highlighting Templates.


I recently change to RoyalTS from Mobaxterm (License is too expensive), no doubt that UI of RoyalTS is way more modern compared to Moba and I am loving RoyalTS so much.


However, one thing I noticed was although RoyalTS supports Text Highlighting (Syntax Highlight) for Terminal (Rebex). By default it did not includes any pre-defined options unlike Mobaxterm.


In Mobaxterm, right after installation and establish a SSH connection, 
it is by default that it will auto highlight texts like "ERROR", "Warning", "IP Address", "Yes", "No" and etc as shown in screenshot attached. 


Hence I would suggest RoyalTS to have something similar to add some pre-defined Text Highlighting Templates instead of requiring users to figure out Regex and syntaxes to highlight.


I would like to give kudos to one of Royal TS Support Guru that share a good few Regex examples, but again it will be so much more easier to have the template out-of-box pre-defiend.


Thanks

Comparing Syntax Highlight / Text Highlight between 
Mobaxterm and RoyalTS:

Mobaxterm:

image

Royal TS

image



Some example screenshots from Mobaxterm I search from Google with Syntax Highlighted:

image



image




1 person likes this idea

Thank you for the feedback! I will put this on our todo list and hope to get this implemented once V6 has been released.


Regards,
Stefan


2 people like this

Thanks for the update! looking forward it!

Yes please


1 person likes this

Could you share the regex expression the RoyalTS support tech gave you? I like this idea as well.

Hi!


I just implemented this (will be available in the next V6 beta release):

Clicking an individual item will just pre-fill the regular expression and lets you modify/add it yourself.

Clicking on "Add all from Category" will add all the regular expressions from the category into the list with default colors. You can simply modify the entry by clicking on "Remove" which populates the regular expression and color form fields, then add it again.

Clicking "Add all from all Categories" will add all the available regular expressions to the list:

Here's the list I implemented:

-------------------------------NETWORKS-------------------------------------

## Matches IPv4 addresses

\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b


## Matches IPv6 addresses

\b(?:(?:(?:[A-F0-9]{1,4}:){6}|(?=(?:[A-F0-9]{0,4}:){0,6}(?:[0-9]{1,3}\.){3}[0-9]{1,3}(?![:.\w]))(([0-9A-F]{1,4}:){0,5}|:)((:[0-9A-F]{1,4}){1,5}:|:)|::(?:[A-F0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}|(?=(?:[A-F0-9]{0,4}:){0,7}[A-F0-9]{0,4}(?![:.\w]))(([0-9A-F]{1,4}:){1,7}|:)((:[0-9A-F]{1,4}){1,7}|:)|(?:[A-F0-9]{1,4}:){7}:|:(:[A-F0-9]{1,4}){7})(?![:.\w])\b


## MAC Address,

\b([0-9a-fA-F]{2}:??){5}([0-9a-fA-F]{2})\b


## localhost

\b(?i)localhost\b


## Color

#FF4DFF

#000000


---------------------------------INFO---------------------------------------


## Matches Email,

^((\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)\s*[;,.]{0,1}\s*)+$


## Matches International Phone Number

^\+(?:[0-9] ?){6,14}[0-9]$


## Matches URL

^(https?|ftp|file)://.+$


## XML Tags

</?([A-Za-z](?=([^\s>/]*))\2)(?=((?:=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)|[^>])*))\3(?:>|$)


## Matches Info Message

\b(?i)last (login|failed login)\b|\b(?i)info(?:rmation)?\b|\b(?i)(transmitted|received)\b


## Color

#54CCEF

#000000


--------------------------------WARNING-------------------------------------

## Matches Warning

\b(?i)warn(?:ing)?\b|\b(?i)not (found|supported|permitted|allowed)\b|\b(?i)connection (refused|closed)\b|\b(?i)disconne(ct|cted|cting)\b|\b(?i)(refused|stopped|exited|unknown|unsupported)\b|\b(?i)expire(?:d)?\b


## Color

#FFC000

#000000


--------------------------------SUCCESS-------------------------------------

\b(?i)(up|listen|accepted|session opened)\b|\b(?i)enable(?:d)?\b|\b(?i)y(?:es)?\b|\b(?i)succe(ss|ssful|ssfully)\b|\b(?i)conne(ct|cted|cting)\b|\b(?i)establish(?:ed)?\b|\b(?i)activ(e|ated)\b


## Color

#18ED93

#000000


--------------------------------FAILED--------------------------------------

\b(?i)(root|down|shutdown|denied|problem|notconnect|connection timed out|permission denied|authentication failure|session closed|packet loss|inactive)\b|\b(?i)n(?:o)?\b|\b(?i)disa(ble|bled|llowed)\b|\b(?i)fa(il|iled|ilure|ult|ulted)\b|\b(?i)er(r|ror|rors)\b


## Color

#FF6060

#000000


1 person likes this

If you have any feedback, like new regex you want to see in the list or default colors for the entries, let me know.


Thanks,
Stefan

Finally :) Thank you!
Login or Signup to post a comment