Visual Studio - Productivity Power Tools - RegEx f

2019-05-28 10:20发布

问题:

Path in my project:

C:\Unicorns\Fart.Rainbows\Classes\someFiles.cs

How do I color code tabs based on file path containing the following?:

"\Fart.Rainbows\"

It looks like my question is asked and answered here, but I can't seem to get the regex right.

The following works in a regex tester I tried, but not in Prod Power Tools:

\b\\Fart\.Rainbows\\\b

回答1:

Try changing regular expression from

\b\\Fart\.Rainbows\\\b

to

.*\b\\Fart\.Rainbows\\\b.*

See if this helps.