[web2py] Re: How to create own "vocabulary"?

2011-12-08 Thread Massimo Di Pierro
the proper way is using a parer but the shortcut (used in markmin) is using regular expressions def process(text): import re text = re.compile('\[(?P.+?)\]).sub('',text) # ... more for other rules return text but you have to make sure rules do not conflict with each other (nested matc

[web2py] Re: How to create own "vocabulary"?

2011-12-09 Thread lyn2py
Thanks Massimo. I will try this first. On Dec 9, 1:11 pm, Massimo Di Pierro wrote: > the proper way is using a parer but the shortcut (used in markmin) is > using regular expressions > > def process(text): >    import re >    text = re.compile('\[(?P.+?)\]).sub('',text) >    # ... more for other