(?<=\[(\w\w)-I\])[^\]]+(?=\[\1-F\])
It's hard to determine exactly what your rules are, so I used these:
The opening tag is defined as a left square-bracket followed by 2 word
characters, followed by a hyphen, followed by the character 'I', followed by
a right square-bracket. The closing tag is defined as a left square-bracket,
followed by the same 2 word characters in the opening tag, followed by a
hyphen, followed by the character 'F'. I used a positive look-behind, with a
group around the 2 characters preceding the hyphen, assumed that the
contents between would not contain the left squaare-bracket, and would
consist of at least one character, and a positive look-ahead, referencing
the same group from the positive look-behind. This results in a set of
matches of all characters between the opening and closing tags as I defined
them.
--
HTH,
Kevin Spencer
Microsoft MVP
Ministry of Software Development
http://unclechutney.blogspot.com
Never trust a dunderhead with a blunderbuss.
"Eduardo Luiz" <po******@gmail.comwrote in message
news:11*********************@m7g2000cwm.googlegrou ps.com...
Hi.. need help..
Sample text:
[NF-I]
nnn
nnn
nnn
nnn
nnn
[NF-F]
[BB-I]
nnn
[BB-F]
[BB-I]
nnn
[BB-F]
[BB-I]
nnn
[BB-F]
need get groups.... select return 4 groups.. like =
\[(?<InitialTag>.*)](?<Text>.*)\[(?<FinalTag>.*)]
but code return 1 match
[NF-I]
nnn....
[BB-F]
Thanks!