Click here to Skip to main content
15,791,758 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Account For Which Logon Failed:\s*.*\s*Account Name:\s*(.+?)"

Above regex giving me result as : Account For Which Logon Failed: Account Name:Test123 Account Domain:aaa Source Network Address:"

Now want to find substring from above resultset to get the string "Account Name:Test123" by another regex.

What I have tried:

Account For Which Logon Failed:\s*.*\s*Account Name:\s*(.+?)"
Updated 17-Apr-21 5:44am

Just a few interesting links to help building and debugging RegEx.
Here is a link to RegEx documentation:
perlre -[^]
Here is links to tools to help build RegEx and debug them:
.NET Regex Tester - Regex Storm[^]
Expresso Regular Expression Tool[^]
RegExr: Learn, Build, & Test RegEx[^]
Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript[^]
This one show you the RegEx as a nice graph which is really helpful to understand what is doing a RegEx: Debuggex: Online visual regex tester. JavaScript, Python, and PCRE.[^]
This site also show the Regex in a nice graph but can't test what match the RegEx: Regexper[^]
Share this answer
Use the Groups feature: they include "Match Prefix but exclude it" and "Match Suffix but exclude it":
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900