I\'m looking for a Regex that converts a string like
kbt-y102_9999_0001v-s001v
into N1v-s1v
N1v-s1v
kbt-y102_
You could capture 1v and 1r in a group and replace with:
1v
1r
N$1-S$2
[^_]+_[0-9]{4}_[0-9]{3}([0-9][vr])-s0+([0-9][vr])
Demo