I have the following json but for some reason I keep getting an error with this line:
"Test": "Hostname:\s+(?<Hostname>[^\n]*)\s+Site name:\s+(?<SiteName>[^\n]*"
My JSON:
{
"Rules": [{
"Field": "Subject",
"Test": "^(Azure Exception)",
"Cases": [{
"Field": "Content",
"Test": "Hostname: az.....(?<Hostname>[^\n])",
"Cases": [{
"Field": "Content",
"Test": "Hostname:\s+(?<Hostname>[^\n]*)\s+Site name:\s+(?<SiteName>[^\n]*)"
}]
}]
}]
}
This is a valid regex expression as far as i can tell. Anyone know what I'm doing wrong?
I'm using https://jsonlint.com/ to test my json.
Testing the regex: https://regex101.com/r/l4tn4W/3/.
Cheers