A symbol in Ruby is usually a colon, followed by an identifier: :abc or a colon followed by an operator: :-. If you could catch at least these cases, it would be helpful already.
It can also be a colon, immediately followed by a string: :"a b". You need this if your symbol contains spaces. This is a symbol where the printed representation has an 'a', followed by two spaces, and then an 'b'. The string can have single or double quotes: :'a b' You can also use %s(a b) instead. As with all the %-constructs in Ruby, you can choose the delimiters. %s[a b] or %sqa bq would denote the same symbol. In the last example, the delimiter is the letter q. I can choose it as a delimiter, because the symbol itself does not contain a q. The idea with these delimiters is similar to regular expressions %r(....), and you find the same concept in the syntax of, say, Perl, so my guess you can steal some highlighting code from the way the Perl highlighter works. -- Ronald Fischer (Germany) <https://forum.pspad.com/read.php?2,74180,74185> PSPad freeware editor https://www.pspad.com