Matching 'menu_1_29_training' not 'menu_2_8_priv_training'
Posted: Thu Jan 29, 2009 11:56 pm
I would like a regex that matches
menu_2_8_training
But not
menu_2_8_private_training
I have
for my regex but it doesn't work
I would like to literally match 'menu_' then next word after '_' to be anything but not '_'... again with the next word after 2nd '_' to be anything BUT an '_'
- then literally match the 'training'
menu_*_*_training would match but menu_*_*_private_training wouldn't - Any help and I'll buy you a beer - and deliver it... to ANYWHERE. I hope my babbly makes some sense.
Thanks in advance.
menu_2_8_training
But not
menu_2_8_private_training
I have
Code: Select all
(menu_.*?_([^_]*)_training)I would like to literally match 'menu_' then next word after '_' to be anything but not '_'... again with the next word after 2nd '_' to be anything BUT an '_'
- then literally match the 'training'
menu_*_*_training would match but menu_*_*_private_training wouldn't - Any help and I'll buy you a beer - and deliver it... to ANYWHERE. I hope my babbly makes some sense.
Thanks in advance.