Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.NET Regex expressions
#1
Hello!

I'm trying to write a window trigger for when I open any of my browsers (Chrome, Edge, Brave), except for the Edge browser using a "Work" profile.

I've come up with the following, using a .NET Regex expression
Code:
Copy      Help
Triggers.Window[TWEvent.ActiveNew, null, null, "**m chrome.exe||msedge.exe||brave.exe"] = o => {
    print.it("Browser Triggered");
    var w = wnd.find("**R ^(?=.*\b(Chrome|Edge|Brave)\b)(?!.*\bWork - Microsoft Edge\b).*");
    if (w.Is0) { print.it("Browser Not Found"); } else {
        print.it("Browser Found");
    }

However, it does not seem to work, for any browser that I open. 
My results are always:
Code:
Copy      Help
Browser Triggered
Browser Not Found

As far as I know, the Regex is correct. Am I using it wrong? Am I doing something else wrong?

Thanks!!!


Messages In This Thread
.NET Regex expressions - by lipinskicad - 09-27-2024, 08:53 PM
RE: .NET Regex expressions - by Gintaras - 09-28-2024, 05:06 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)