Be aware that RegEx101.com does not start our in PCRE mode, you have to SET IT THAT WAY by selecting the PCRE (PHP) option under the Flavors menu in the left pane! Also note on the very right edge of the RegEx text input it shows some REGEX FLAGS of which g and m are set by default but only the g is always correct for Splunk. For example, rex and regex commands DO NOT use m by default (but LINE_BREAKER does), so you must prefix your RegEx with (?m) to make it work the same way in Splunk (or de-select the m flag on RegEx101.com).
Also be aware that splunk has both pcregextest and regextest CLI tools that you can use:
https://docs.splunk.com/Documentation/Splunk/latest/Admin/CLIadmincommands
... View more