Splunk Search

Online, interactive regular expression tester for Splunk regular expressions?

stefanlasiewski
Contributor

I am using the Interactive field extractor to try and extract certain fields. However, regular expressions are tricky and testing regular expressions on Splunk is slow.

Can anyone recommend a regular expression testing website which will work with Splunk regular expressions?

For example, http://regexpal.com/ (Written by Steven Levithan, coauthor of the Regular Expressions Cookbook works with certain regex flavors, but it doesn't always work with the regular expressions generated by the Splunk Interactive Field Extractor.

Tags (3)

haraksin
Communicator

It is absolute insanity that we continue to have this issue - Regex isn't that hard, but Splunk makes it harder by creating new rules and exceptions to those rules. Unfortunately this is why Splunk is in the position they are in - not user-friendly, and lack of proper GUI features that allow testing before integration.

0 Karma

sherm77
Path Finder

David Maislin told me about http://regex101.com several years ago, and it made a big difference for me. It's a great tool and everyone should use it (or try it) if you're learning regex. I hope this helps someone

ClairmontSplunk
Engager

I've used this site for years and it helps me a lot with regex building. However, it seems that my applying it to Splunk seems to be failing miserably despite the regex being built properly.

Not sure if it's a pebkac issue or not though

0 Karma

fusednet
New Member

All of those don't support (?\w+) constructs. It isn't possible to test field extraction with those.

note: i'm not able to use angular brackets here.
( ? < field1 > \w+ )

0 Karma

MHibbin
Influencer

stefanlasiewski,

Someone on one of my Splunk courses (actually he was on both my Splunk courses), pointed me to the following site.. "http://gskinner.com/RegExr/".

It allows you test out some regular expressions, with some of your actual data. This is achieved with a simple "copy and paste" of you data into the window provided on the webpage. You can type in your own regex, or you can use the right-hand pane to look through the various "samples" if you are unsure.

It definately helped me the most when learning regex. It's hasn't always met my requirements, but it always helps in some way... worth a look. Plus from the looks of things, it provides more assistive features than the tool you mentioned.

Hope this helps,

MHibbin

P.S. If this answers you question please mark it as "Accepted", and/or upvote. Thanks

lguinn2
Legend

Splunk uses the PCRE flavor of regular expressions, so anything that is PCRE-compliant should work.

http://www.regular-expressions.info is a great site, and points to a variety of regular expression books, software and other resources.

MHibbin
Influencer

Definately a useful site!

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...