Reputation: 1
I need to extract a username direct from logs using regex but not when the username ends with $, example log below:
Username: domain\username
I've been using the following regex to extract data-Username:.*?\\(.*?\s
I need regex to completely ignore the string and not extract it if it ends with $
Is this possible?
Upvotes: 0
Views: 192
Reputation: 21576
Search for a text and any non-$-sign at the end:
Username: (.*[^\$])$
Upvotes: 1