random_design
Newcomer
- Joined
- Jan 24, 2005
- Messages
- 4
I hope somebody can help me.
I need a regular expression that matches:
||cell1||cell2||cell3||
||cell4||cell5||cell6||
and
||cell1||||cell2||
||cell3||cell4||cell5||
etc.
but not:
||cell1||cell2
||cell3||cell4||
or:
cell1||cell2||
||cell3||cell4||
(missing '||' characters)
So I only want to capture a full 'table' of cells. It must use must use multi-line but multiple tables should be found when placed under each other.
For example:
||cell1||cell2||
||cell3||||
||cell1||cell2||cell3||
||cell4||cell5||cell6||
should give two matches.
A table should have an unlimited size.
After trying a couple of hours I came up with the following, which works in RegexBuddy: (?:^\|\|.+?\|\|(?:\r\n)?)*$
BUT (!) It does not work with the .NET engine.
I hope somebody can help me, cause I'm lost.
Thanks,
Marc Selman
I need a regular expression that matches:
||cell1||cell2||cell3||
||cell4||cell5||cell6||
and
||cell1||||cell2||
||cell3||cell4||cell5||
etc.
but not:
||cell1||cell2
||cell3||cell4||
or:
cell1||cell2||
||cell3||cell4||
(missing '||' characters)
So I only want to capture a full 'table' of cells. It must use must use multi-line but multiple tables should be found when placed under each other.
For example:
||cell1||cell2||
||cell3||||
||cell1||cell2||cell3||
||cell4||cell5||cell6||
should give two matches.
A table should have an unlimited size.
After trying a couple of hours I came up with the following, which works in RegexBuddy: (?:^\|\|.+?\|\|(?:\r\n)?)*$
BUT (!) It does not work with the .NET engine.
I hope somebody can help me, cause I'm lost.
Thanks,
Marc Selman