[Mediawiki-l] Parsing raw text
Platonides at gmail.com
Sat Jan 5 17:41:52 UTC 2008
Thomas Dalton wrote:
>>> Ah! I see. I was thinking about HTML tables and was completely
>>> confused! Would a simple regexp that removes everything between < and
>>>> do the trick? I've never really got the hang of regexps, so I won't
>>> give you any code to try, but it should be a relatively easy one, I
>> You shouldn't use regex for HTML tags. Use the php function strip_tags()
> That's the problem with being a novice user of a language. You end up
> doing things the hard way because you don't know the existence of a
> built in function to do all the work for you!
In fact, i didn't know that function. I googled for it presuming its
existance ("php remove html tags"). If not existing, a simple state
machin with a for() does it. Regex for html is usually overkilling.
More information about the MediaWiki-l