View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
R Avery R Avery is offline
external usenet poster
 
Posts: 220
Default RegEx to parse something like this...

Say i have text that has many tags which are enclosed within curly
braces. For example,

"asdlghjkshkg {HOHO} ghk48975 83y4, c98ty34 {NANA} fshdjh348679njc
{ASDF} jdgghkjwer 435"

Say I want to write a RegEx to extract all of these tags. I thought
perhaps something like "(?:([^{]*){([^}]*)})+" might work, but it does
not seem to... strangely, it still matches the entire string, but i
cannot get it to properly return all of the submatches.

Any help would be appreciated.