While rex command in the search query will work, you should consider creating a field extraction so that the same regular expression need not to be written every time you need to fetch the same data from these events. Through field extractions the fields will be available at search time when you select specific index/sourcetype.
Splunk can automatically generates generic regular expression in the interactive mode. However, you can also provide your own regular expression (which would be same as what you run in rex command).
Interactive mode will allow allow you to review whether there are any unmatched events in the 1000 events listed by your search query. That way you test your regular expression across actual indexed data.
You can also use regex101 website to test your regular expression for some of your sample log snippets.
... View more