« Module:IdentifierRACJ » : différence entre les versions
Aller à la navigation
Aller à la recherche
Correction de la fonction extraireNoDeDossier |
Aucun résumé des modifications |
||
| Ligne 4 : | Ligne 4 : | ||
function p.extraireNoDeDecision(frame) | function p.extraireNoDeDecision(frame) | ||
local texte = frame.args[1] or "" | local texte = frame.args[1] or "" | ||
-- Match un identifiant de type 40-0009775 | |||
local identifiant = string.match(texte, "(%d%d%-%d%d%d%d%d%d%d)") | local identifiant = string.match(texte, "(%d%d%-%d%d%d%d%d%d%d)") | ||
return identifiant or "" | return identifiant or "" | ||
| Ligne 11 : | Ligne 12 : | ||
function p.extraireNoDeDossier(frame) | function p.extraireNoDeDossier(frame) | ||
local texte = frame.args[1] or "" | local texte = frame.args[1] or "" | ||
-- Match un identifiant de type 40-0733535-004 | |||
local identifiant = string.match(texte, "(%d%d%-%d%d%d%d%d%d%d%-%d%d%d)") | local identifiant = string.match(texte, "(%d%d%-%d%d%d%d%d%d%d%-%d%d%d)") | ||
return identifiant or "" | return identifiant or "" | ||
Version du 1 juin 2025 à 12:50
local p = {}
-- Extrait un identifiant de la forme : 2 chiffres - 7 chiffres (ex: 40-0009775)
function p.extraireNoDeDecision(frame)
local texte = frame.args[1] or ""
-- Match un identifiant de type 40-0009775
local identifiant = string.match(texte, "(%d%d%-%d%d%d%d%d%d%d)")
return identifiant or ""
end
-- Extrait un identifiant de la forme : 2 chiffres - 7 chiffres - 3 chiffres (ex: 40-0733535-004)
function p.extraireNoDeDossier(frame)
local texte = frame.args[1] or ""
-- Match un identifiant de type 40-0733535-004
local identifiant = string.match(texte, "(%d%d%-%d%d%d%d%d%d%d%-%d%d%d)")
return identifiant or ""
end
return p