Quote:
|
I need help to crete regex for the unsorted lists and sorted lists which can be nested.
|
Problem with regular expressions is that they mostly are used for a class of languages which are - well - regular. Which means: You cannot really handle bracket structures. If you want to know about the theoretical limitations, have a look at the wikipedia entry (
Regular expression - Wikipedia, the free encyclopedia).
Unfortunately, the socalled regular expressions of .NET (and UNIX) are more powerful than the "theoretical" regular expressions. Which leads to expectations that are to high.
But, a tipp: Maxbe you can use a loop in which you replace the lists (from inside out).
Something like:
<while "regular expression for both list types" hits>
Replace inner unsorted list markup
Replace inner sorted list markup
<end while>
The idea is not perfect but might work.
Regards
Jens
PS. The best idea would be to look at open source implementations of other wikis....