發表文章

目前顯示的是 3月 1, 2019的文章

Regex pattern to produce appropriate escape character behavior

圖片
-1 I'm making a Sublime Text 3 language definition for syntax highlighting. The language is a simple 'expression language' (nothing to do with Java) that is used to display information from a media library on a display panel. The purpose of the syntax highlighting is to clarify exactly what will be displayed on the panel. Accordingly, I would like to explicate exactly what a sequence of escape characters will look like when interpreted and shown on the display panel. The escape character is a forward-slash, and if you would like to display a literal forward-slash, you have to escape it with another. Therefore, a series of forward-slashes will result in every-other forward-slash being displayed on the panel. Additionally, if there is a special character after a forward-slash, it will be escaped - but i