View Single Post
  #1  
Old 03-01-2019, 07:28 AM
w00t w00t is offline
Registered User
 
Join Date: Oct 2017
Posts: 3
Highlight keywords case insensitive

Iím wondering if itís possible to do case insensitive regex match for keywork highlights?

/(ethernet)/i

Would match:

ethernet
Ethernet
ETHERNET
eThErNeT

Instead I have to do something like this:

(ethernet|Ethernet|ETHERNET|eThErNeT)

or

([eE][tT][hH][eE][rR][nN][eE][tT])

Which makes it quite annoying when dealing with ethernet/fast/gig/ten/hundred etc. Very long and bad regex to simulate insensitive matching.

Any ideas?
Reply With Quote