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
  • 853
  • 14
  • 37

1 Answers1

1

Try this pattern:

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

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

Demo

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360