I have a string:
2km739
and I am trying to use a regex to capture the 2739
I know I could just use two capture groups and combine them after (EDIT: or extract the numerical chars after I capture the group), but this would be a little easier in this situation and I am curious if this is possible.
I have this:
([0-9](?=[km])(?<=[km])\d+)
but it doesn't work
it only works if I add the km
in there somewhere
([0-9](?=[km])km(?<=[km])\d+)
I would also think this would work, but I learned non-capture groups still get capture but the outside group
([0-9](?:km)\d+)