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!
help
> Hi.. need help..
>
[quoted text clipped - 26 lines]
>
> Thanks!
(?<=\[(\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.

Signature
HTH,
Kevin Spencer
Microsoft MVP
Ministry of Software Development
http://unclechutney.blogspot.com
Never trust a dunderhead with a blunderbuss.
> Hi.. need help..
>
[quoted text clipped - 26 lines]
>
> Thanks!
Eduardo Luiz - 23 Nov 2006 18:36 GMT
nice nice.. thanks!
im brazilian.. sorry my english..
im found a solution..
\[(?<TagInicial>.*?)](?<Texto>.*?)\[(?<TagFinal>.*?)]
Thanks a lot!
> (?<=\[(\w\w)-I\])[^\]]+(?=\[\1-F\])
>
[quoted text clipped - 51 lines]
>
> > Thanks!- Hide quoted text -- Show quoted text -
Kevin Spencer - 23 Nov 2006 22:11 GMT
You're very welcome. And there is certainly no need to apologize for your
English. The closest language to Portuguese that I can speak is Spanish, and
I'm not very good at that! And other than Spanish, I'm afraid English is the
only language I speak. The important thing is, we communicated successfully.
:-)
Kevin Spencer
Microsoft MVP
Ministry of Software Development
http://unclechutney.blogspot.com
Never trust a dunderhead with a blunderbuss.
> nice nice.. thanks!
>
[quoted text clipped - 65 lines]
>>
>> > Thanks!- Hide quoted text -- Show quoted text -