OK, I need a RegEx that traps the first word up to underscore character but then capture the next words that may have a underscore character. So, here is a group and the expected result:
gear_Armor_Blessed_Robes = "gear", "Armor" and "Blessed_Robes"
gear_Armor_Chain_Coif = "gear", "Armor" and "Chain_Coif"
gear_Armor_Chain_Hauberk = "gear", "Armor" and "Chain_Hauberk"
gear_Armor_Chain_Shirt = "gear", "Armor" and "Chain_Shirt"
gear_Armor_Chain_Leggings = "gear", "Armor" and "Chain_Leggings"
There’s no need to use a regex for this, just use
indexOfandsubstring:With regex, you’d have to use the following, which is a tad more complicated and harder to read: