What are the correct regular expressions for syntax highlighting?

后端 未结 2 506
被撕碎了的回忆
被撕碎了的回忆 2021-01-29 12:29

What are the correct regular expressions using NSRegularExpression for syntax highlighting?

The following test must be passed:

code // comment
code /* c         


        
2条回答
  •  抹茶落季
    2021-01-29 13:16

    I think it's impossible in global sense (not just on the sample). So, regexp cann't be used for syntax highlighting.

提交回复
热议问题