Question on domains.xml agent mapping with case sensitive

Document ID : KB000095752
Last Modified Date : 10/06/2018
Show Technical Document Details
Issue:
Is the "agent mapping" definitions in the domains.xml all case-sensitive? If yes, is there any regex that can be used to make it insensitive?

Regex used
<agent mapping="(.*)(?i)tomcat(.*)"/> 

String matching against apmg2a9s3g0|Tomcat Actual customer string  -- apmw2k8r2c0|Tomcat) 

 works with online java regex tester, but not working in domains.xml. 

Tried using (?i) to make the regular expression for Agent mapping to be case insentive but appears to be not working like below: 
https://stackoverflow.com/questions/9655164/regex-ignore-case-sensitivity 
Environment:
All supported APM releases
Cause:
   The regex was incorrect . The string was not in parentheses. 

 
Resolution:
   Instead of 
  <agent mapping="(.*)(?i)tomcat(.*)"/> 
 
   Use 
  <agent mapping="(.*)(?i)(tomcat)(.*)"/>