❔ Regex to find string between _ or next uppercase letter

Can you help me with regex?
Roads_RoadNode
Roads_Road_261Node
Roads_Curb_91Node
Roads_CurbNode
Roads_Marking_123Node
Roads_MarkingNode

I need to capture these:
Road
Road
Curb
Curb
Marking
Marking


This regex works only for strings between underscore, but I need to support also other cases.
Roads_(.*)_.*


Don't have any idea how to fix it. :/
Was this page helpful?