M
meryl
Hi,
I have this regular expression
blockRE = re.compile(".*RenderBlock {\w+}")
it works if my source is "RenderBlock {CENTER}".
But I want it to work with
1. RenderTable {TABLE}
So i change the regexp to re.compile(".*Render[Block|Table] {\w+}"),
but that breaks everything
2. RenderBlock (CENTER)
So I change the regexp to re.compile(".*RenderBlock {|\(\w+}|\)"),
that also breaks everything
Can you please tell me how to change my reg exp so that I can support
all 3 cases:
RenderTable {TABLE}
RenderBlock (CENTER)
RenderBlock {CENTER}
Thank you.
I have this regular expression
blockRE = re.compile(".*RenderBlock {\w+}")
it works if my source is "RenderBlock {CENTER}".
But I want it to work with
1. RenderTable {TABLE}
So i change the regexp to re.compile(".*Render[Block|Table] {\w+}"),
but that breaks everything
2. RenderBlock (CENTER)
So I change the regexp to re.compile(".*RenderBlock {|\(\w+}|\)"),
that also breaks everything
Can you please tell me how to change my reg exp so that I can support
all 3 cases:
RenderTable {TABLE}
RenderBlock (CENTER)
RenderBlock {CENTER}
Thank you.