match nested tags



hi

is there a simple way using regular expression to find nested tags?

for example, the string is:

{{ {A} this is part A of the document
{{ {A.1} this is part A1 }}
}}

I want to define a function findtag("A") to give me

this is part A of the document
{{ {A.1} this is part A1 }}


and findtag("A.1") to give me

this is part A1

can anyone give some hint?
thanks

Qianqian

.



Relevant Pages

  • Re: match nested tags
    ... DJ Stunks wrote: ... > is there a simple way using regular expression to find nested tags? ... > for example, the string is: ...
    (comp.lang.perl.modules)
  • Re: match nested tags
    ... FangQ wrote: ... is there a simple way using regular expression to find nested tags? ... for example, the string is: ...
    (perl.beginners)
  • Re: match nested tags
    ... is there a simple way using regular expression to find nested tags? ... for example, the string is: ... the number of opening/closing constructors and return contents between ...
    (perl.beginners)
  • Remove some characters from a string
    ... I can't seem to find the right regular expression to achieve what I ... I'd like to remove all characters from a string that are not ... Would you have any hint? ...
    (comp.lang.python)
  • Re: Get regular expression
    ... own tree structure. ... Expression compares a string character-by character, ... regular expression solution, which was about as close as one could get to ... the structure of the hierarchy can be inferred by using ...
    (microsoft.public.dotnet.languages.csharp)