Difference between revisions of "DPL:Manual - dplnum"

From FollowTheScore
Jump to: navigation, search
(New page: {{Type Manual|section=dplnum}} === Syntax === <pre><nowiki> {{#dplnum:text}} </nowiki></pre> === Effect === Tries to gues a number that is buried in the text. Uses a set of heurist...)
 
 
Line 11: Line 11:
 
  Tries to gues a number that is buried in the text.
 
  Tries to gues a number that is buried in the text.
 
  Uses a set of heuristic rules which may work or not.
 
  Uses a set of heuristic rules which may work or not.
 +
 +
The idea is to extzract the number so that it can be used as a sorting value in the column of a DPL table output.
  
 
=== Example ===
 
=== Example ===

Latest revision as of 08:55, 13 October 2009

Manual dplnum

Syntax

  {{#dplnum:text}}

Effect

Tries to gues a number that is buried in the text.
Uses a set of heuristic rules which may work or not.
The idea is to extzract the number so that it can be used as a sorting value in the column of a DPL table output.

Example

 {{#dplnum:this is 4711 a text with a number}}     returns:  4711
 {{#dplnum:well above 47 Mio. US$}}     returns:  47000000
 {{#dplnum:13 Mrd}}     returns:  13000000000
 {{#dplnum:it is 47,123 Mio}}     returns:  47123000
 {{#dplnum:it is 47.123,56}}     returns:  47123
 {{#dplnum:it is 47,000}}     returns:  47
 {{#dplnum:it is 4.13}}     returns:  413
 {{#dplnum:it is 4,13}}     returns:  4
 {{#dplnum:it is 0,13}}     returns:  0