I'm needing to extract a string of 3 numbers between a beginning character and a possibility of three different ending characters. Staring with _a and ending with either _b, _c or _d. I know how to do it with strfind but really want to know how to use regexp.
For example string could be:
ggggga_a123_cggggg
or/
gggggg_a345_bggggg
or/
gggggg_a456_dggggg
How do I just extract the three numbers without knowing which ending character it will be. Thanks
regexp(s,'(?<=_a).*(?=_b|_c|_d)','match')