Start a new topic
Implemented

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!

The ideal would be if you had to apply to all hosts of a folder simultaneously, this would make it much easier.

Hi Elizandro,


you could apply those to multiple/all hosts using our bulk-edit feature:

https://www.royalapplications.com/go/kb-ts-win-folderdashboard

https://www.royalapplications.com/go/kb-ts-win-bulkedit


The only issue right now is, that the current release has a bug which prevents you from bulk-editing multiple entries. 


I have an internal build where this has been fixed but please note that this hasn't been fully tested yet:

https://download.royalapps.com/RoyalTS/RoyalTSInstaller_6.00.50626.0.msi


Should you encounter any issues with this build, please let us know.


Thanks,
Stefan




1 person likes this

I had no idea this was put into V6, this is amazing. I'd been wanting a better way to manage my Syntax Highlighting, I'd previously just been making "Template" blank versions to duplicate. I did notice that when I have an exported ruleset in the window, when I arrow over it can be an abnormally large window if the regex is long, like the IPv6 Address Regex. Would there be a possibility of adding something like a "Description/Friendly Name" field so that when they're Exported/Imported, it's easier to identify what each regex does, similar to the defaults you've put in? See screenshots for examples

Awesome, I've just updated the names in my ruleset files and they've updated in the Royal TS client. Would there happen to be any plans to add a "Name" field inside Royal TS in the Text Highlighting section? It looks like when I export the rulesets, it sets the name as whatever the Regular Expression field was in the client. Just to save some time editing the .ruleset files manually


Thanks!

Zach

My previous post caused issues with the forum so I had to delete/repost it. Here's the sample json we use internally which shows how to specify a category and a name for an entry:


{
  "category": "Text",
  "rules": [
    {
      "name": "Email Address",
      "regularExpression": "(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])",
      "textColor": "#54CCEF",
      "backColor": "#000000"
    },
    {
      "name": "Phone Number",
      "regularExpression": "^\\+(?:[0-9] ?){6,14}[0-9]",
      "textColor": "#54CCEF",
      "backColor": "#000000"
    },
    {
      "name": "URL",
      "regularExpression": "(https?|ftp|sftp|ftps)://(-\\.)?([^\\s/?\\.#-]+\\.?)+(/[^\\s]*)?",
      "textColor": "#54CCEF",
      "backColor": "#000000"
    },
    {
      "name": "XML Tags",
      "regularExpression": "</?([A-Za-z](?=([^\\s>/]*))\\2)(?=((?:=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s>]+)|[^>])*))\\3(?:>|$)",
      "textColor": "#54CCEF",
      "backColor": "#000000"
    }
  ]
}


Regarding your question:

we do not have plans to provide a UI for name and/or category. One reason is that it doesn't make sense for normal use cases (where you don't export the configuration) and we don't want to bloat the UI or confuse the users with UI which doesn't really make sense. We also think that exporting/tweaking the json for team usage is a one time task and considered an "edge case". If more users are requesting a UI to specify the metadata, we will reconsider, of course.


Regards,
Stefan


2 people like this

@Stefan Koell it would be awesome to see networking configuration templates such as Cisco built into Royal.


See this other thread - https://support.royalapps.com/support/discussions/topics/17000024442?page=1

Login or Signup to post a comment