Splunk Search

Can you help me build the regex that would extract a filename without filenamenumber and extension?

ugruner
Explorer

Hi,

i am not familiar with regex and am trying to extract only the filename from the following data without the number at the end:

myfile2.txt
myfileagain.doc
myfile33.txt

to

myfile
myfileagain
myfile

REGEX=(\bmy\w\D+) was my first idea, but I had no luck.

Can you give me a tip on how to solve this?

Regards
Udo

Tags (2)
0 Karma

FrankVl
Ultra Champion

Try something like this:
(?<filename>[a-zA-Z]+)\d*\.\w+

https://regex101.com/r/rAObpF/2

.conf21 CFS Extended through 5/20!

Don't miss your chance
to share your Splunk
wisdom in-person or
virtually at .conf21!

Call for Speakers has
been extended through
Thursday, 5/20!