\b(http(s)?://[A-Za-z0-9_./&?=-]+)
Strings you'd like to emphasize can be highlighted via color or font changes using Xshell's Highlight Sets. NetSarang Computer Manual - Xshell - NetSarang Computer
While simple keyword matching works for many use cases, regular expressions unlock the true power of Highlight Sets. They allow you to:
Check this box if you only want to highlight specific cases (e.g., error vs ERROR ).
Connect to a server and run:
By default, Xshell might ask you which Highlight Set to use when you open a new tab, or you can set a default:
| Category | Example Pattern | Suggested Style | |----------|----------------|-----------------| | Errors | \bERROR\b | Red background, bold white text | | Warnings | \bWARN(ING)?\b | Yellow text on dark background | | Success | \bSUCCESS\b | Green text, bold | | IP Addresses | IPv4 pattern | Cyan text, underlined | | Timestamps | \d4-\d2-\d2 \d2:\d2:\d2 | Dimmed gray |
If you are a system administrator, developer, or DevOps engineer, you probably live in your terminal. More specifically, you likely live in .
Watch the colors light up automatically.
Make your logs instantly scannable by highlighting timestamps. If your server logs output times in HH:MM:SS format, you can highlight them using: \b\d2:\d2:\d2\b Practical Examples: Tailor Your Sets for the Job
If a process only outputs lowercase errors, save processing power and avoid false positives by ensuring your keywords are not case-sensitive.
Alternatively, check the option to use default terminal colors, or style the text with Bold and Underline . Click [OK] to save your rule. 4. Applying the Highlight Set to a Session
