Wikitext allows nested instantiations of templates, so the language is not regular.
Therefore there exists no regular expessions that can match wikitext.
From: MediaWiki-l <mediawiki-l-bounces(a)lists.wikimedia.org> on behalf of Kaartic
Sent: Thursday, June 15, 2017 10:08:00 AM
Subject: [MediaWiki-l] Regex for wikitext
Currently the syntax highlighter of the Wikipedia android app seems to
be slow except on high-end devices. It has been proposed to change the
implementation to provide users with a better (streamlined) experience
As a first attempt it has been thought to use regular expression to
highlight the appropriate wikitext. To avoid re-inventing the wheel, I
thought it would be better to ask if the regular expressions to
identify various wiki syntax elements is in use somewhere ?
I guess there has to be at least some form of formal definition for the
wiki-text syntax somewhere. It would be of great use though it isn't in
the form of regular expressions. Please reply with anything that seems
Note: Any suggestions regarding the improvement of the syntax highlight
implementation would be helpful.
Kaartic Sivaraam <kaarticsivaraam91196(a)gmail.com>
MediaWiki-l mailing list
To unsubscribe, go to: