Dplnum: Difference between revisions
Content deleted Content added
imported>FrozenPlum Prior issue requiring {{purgenote}} seems to have resolved, remove it |
imported>FrozenPlum Reformat a bit |
||
Line 1:
{{DPL manual|section=dplnum}}
==Syntax==▼
Tries to guess a number that is buried in the text, using a set of heuristic rules which may work or not. The idea is to extract the number, so
▲==Syntax==
▲The idea is to extract the number so that it can be used as a sorting value in the column of a DPL table output.
<code><nowiki>{{#dplnum:''text''}}</nowiki></code> where {{tt|text}} is a number within some text.
==
[[Category:Other Modules]]
|
Revision as of 03:05, 11 April 2023
|
Manual | dplnum |
Tries to guess a number that is buried in the text, using a set of heuristic rules which may work or not. The idea is to extract the number, so it can be used as a sorting value in the column of a DPL table output.
Syntax
{{#dplnum:''text''}}
where text is a number within some text.
Examples
{{#dplnum:this is 4711 a text with a number}}
returns: {{#dplnum:this is 4711 a text with a number}}{{#dplnum:well above 47 Mio. US$}}
returns: {{#dplnum:well above 47 Mio US$}}{{#dplnum:13 Mrd}}</nowiki>
returns: {{#dplnum:13 Mrd}}{{#dplnum:it is 47,123 Mio}}
returns: {{#dplnum:it is 47,123 Mio}}{{#dplnum:it is 47.123,56}}
returns: {{#dplnum:it is 47.123}}{{#dplnum:it is 47,000}}
returns: {{#dplnum:it is 47,000}}{{#dplnum:it is 4.13}}
returns: {{#dplnum:it is 4.13}}{{#dplnum:it is 4,13}}
returns: {{#dplnum:it is 4,13}}{{#dplnum:it is 0,13}}
returns: {{#dplnum:it is 0,13}}