Difference between revisions of "Stripformat"

From Sega Retro

(Created page with "<includeonly>{{#replace:{{{1|}}}|{{MD}}|}}</includeonly><noinclude> {{TODO}} Template to strip away any format icons from a string (e.g. {{MD}}, {{SMS}} etc.) Example: <now...")
 
Line 12: Line 12:
 
e.g. {{MD}} 1-4 {{GG}} 1-2
 
e.g. {{MD}} 1-4 {{GG}} 1-2
  
store in a cargo table "1-4" for Mega Drive players, "1-2" for Game Gear. It requires more thought - maybe we need [https://www.mediawiki.org/wiki/Extension:RegexParserFunctions this extension] to match strings properly.</noinclude>
+
store in a cargo table "1-4" for Mega Drive players, "1-2" for Game Gear. It requires more thought - maybe we need [https://www.mediawiki.org/wiki/Extension:RegexParserFunctions this extension] to match strings properly.
 +
 
 +
[[Category:Sega Retro templates]]</noinclude>

Revision as of 15:01, 22 January 2019


Clock.svg
This task is unfinished
This is a wiki task that requires more thought or peer review. An important issue that needs to be solved, which will appear at the top of Sega Retro:Todo until this message is removed.

Template to strip away any format icons from a string (e.g.

Sega Mega Drive

,

Sega Master System

etc.)

Example:

{{Stripformat|{{MD}} 1-2}} -> 1-2

Note: This has been written very quickly to perform a single task. What it probably wants to be able to do is recognise that MD is Mega Drive, and apply that property to whatever text comes immediately afterwards.

e.g.

Sega Mega Drive

1-4

Sega Game Gear

1-2

store in a cargo table "1-4" for Mega Drive players, "1-2" for Game Gear. It requires more thought - maybe we need this extension to match strings properly.