Bonjour,
J'aie fais une petite fonction pour vérifier si un mot peut être un élément d'un date.
Pour cela, j'utilise les Regex dans de l'AS
Mon soucis est que je n'arrive pas à le faire fonctionner avec
ignoring case and diacriticals
end ignoring
Une idée ??
Ci-dessous mon code :
Merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 on Find_Date(sText) ignoring case and diacriticals set sRech to "(Janv(ier)?|Fev(rier)?|Mars?|Avril?|Mai|Juin|Juil(let)?|Aout|Sep(t(embre)?)?|Oct(obre)?|Nov(embre)?|Dec(embre)?¬ |(19|20)[0-9]{2}|[0-9]{2})" set sShell to "echo " & (quoted form of sText) & " | grep -oP " & (quoted form of sRech) set myResult to "" try set myResult to do shell script sShell end try end ignoring return length of myResult end Find_Date
Thais
Partager