Regexing an email from S1

I have an email from S1 with this body

A threat was detected on machine: BLAHBLAH123 with IP…

and I want to grab the machine name. Where my regex guru’s at?

^[A-Z0-9]+

This is probably another fine case for my anything but a space regex.

A threat was detected on machine: {{host:/([^\s]+)/}}

this is my input
A threat was detected on machine: BLAHBLAH123

this is my input

A threat was detected on machine: BLAHBLAH123

(?:\S)[A-Z][A-Z0-9]+

1 Like

I would look at installing GitHub - pemistahl/grex: A command-line tool and library for generating regular expressions from user-provided test cases. It takes all the hard work out of regex.

1 Like