0

I have a few different strings that look like this:

aaaa01b.site.com
bbbb01ccc.site.com
cccc02dd.site.com
dd03eeee.site.com

All I am interested in is the characters between the last numeric digit and the first full stop, ie

b
ccc
dd
eeee

Is there a regular expression that can achieve this?

CEamonn
  • 714
  • 8
  • 27

1 Answers1

1

Try this pattern:

.*\d+([^.]+)\.

The characters you want should be available in the first capture group.

Demo

Tim Biegeleisen
  • 451,927
  • 24
  • 239
  • 318