I am trying to change wikitext into plain text using Python regex substitution. There are two rules for formatting a wiki link.
Here is some text that gives me a headache.
The CD is composed almost entirely of [[cover versions]] of the songs [[The Beatles]] that George Martin [[record producer] created]].
The text above should be changed to:
The CD is composed almost entirely of cover versions of The Beatles songs originally produced by George Martin.
The conflict between [[]] and [[| ]] grammar is my main problem. I don't need one complicated regular expression. Using multiple (possibly two) regular expression substitutions in a sequence is normal.
Please enlighten me on this issue.
source
share