It is currently April 27th, 2024, 11:27 am

regex help - highlight any non word character [solved]

Get help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

regex help - highlight any non word character [solved]

Post by CodeCode »

Hello, I was using this to highlight after numbers

Code: Select all

InlinePattern="(\d{1,2})(.*)"
InlineSetting=Color | #Highlight#
Ok, so this is completely aesthetical. I am hoping to highlight any non word character, including symbols.

I thought \W would do this easy but it isn't working.

Any help is appreciated.

EDIT: OK. It is working. Just had to do it like this "(\W)"

So, I jumped the gun and asked too soon.

But I also am trying to use \d to do the same for any number character. Like this "(\W)(\d)", or this "(\W\d)" but it isn't working.

Thanks for any help. It is likely simple but this sort of thing is confusing to google because most of the time people have really specific needs and I haven't been able to find something that works as expected in rainmeter.

I will continue to look around, there 'should' be a good example out there. :D

EDIT 2:

Oops! got it now.

This works perfectly "(\W)|([0,9])"

Actually, this works better "(\W)|(\d)"
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.