<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.fr.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>27 Jan 2020 12:40:02 Z</lastBuildDate><pubDate>27 Jan 2020 11:41:22 Z</pubDate><description>Bonjour,&#13;
Je cherche à trouver une chaîne particulière dans un fichier.&#13;
Ma chaîne dans le fichier est construit comme : date-heure-mot clé&#13;
La date est au format JJ/MM/AA&#13;
L'heure au format HH:MM:SS&#13;
&#13;
[code:wl]&#13;
sDate = DateVersChaîne(gsDate,"JJ/MM/AA")&#13;
sHeure = HeureVersChaîne(gsHeure,"HH:MM:")&#13;
sTexte est une chaîne = fChargeBuffer(fRepEnCours()+"fichier.txt")&#13;
nPosi est un entier = Position(sTexte ,sDate+"-"+sHeure+"00"+"-Toto")&#13;
nLigne est un entier = PositionVersLigne(sTexte ,nPosi)&#13;
[/code]&#13;
&#13;
Ici je récupère bien la ligne correspondante. &#13;
&#13;
Le problème est donc que les secondes peuvent être variable (ici elles sont entrées en dure "00").&#13;
Lors de ma recherche je n'aurais pas les secondes exactes.&#13;
&#13;
J'ai l'impression que Position n'accepte pas une expression régulière.&#13;
[code:wl]&#13;
nPosi est un entier = Position(sTexte ,sDate+"-"+sHeure+"[0-9]{2}"+"-Toto")&#13;
[/code]&#13;
&#13;
Comment puis-je récupérer ma ligne sans connaitre les secondes ?&#13;
Merci</description><ttl>30</ttl><generator>WEBDEV</generator><language>fr_FR</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier/read.awp</link><title>Rechercher une chaîne dans un fichier</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>BALTASAR</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier-236535/read.awp</comments><pubDate>27 Jan 2020 12:40:02 Z</pubDate><description>2 = nombre de caractères à sauter&#13;
1 = position initiale à rechercher&#13;
&#13;
[code:wl]&#13;
Position est numérique = WildCard_Position(s…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier-236535/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier-236535/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier/read.awp">Rechercher une chaîne dans un fichier</source><title>Re: Rechercher une chaîne dans un fichier</title></item><item><author>Voroltinquo</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier-236532/read.awp</comments><pubDate>27 Jan 2020 12:15:42 Z</pubDate><description>Bonjour,&#13;
A première vue, il va falloir faire ta recherche en 2 temps :&#13;
Dans un premier temps sur le GDH sans les sec, dans un …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier-236532/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier-236532/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier/read.awp">Rechercher une chaîne dans un fichier</source><title>Re: Rechercher une chaîne dans un fichier</title></item><item><author>cecile.aliaga</author><category>pcsoft.fr.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier-236531/read.awp</comments><pubDate>27 Jan 2020 12:13:56 Z</pubDate><description>Bonjour,&#13;
J'ai trouvé au lieu d'essayer de trouver la chaine en une seule fois, je la récupère en 2 fois&#13;
D'abord un position su…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier-236531/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier-236531/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/236530-rechercher-chaine-dans-fichier/read.awp">Rechercher une chaîne dans un fichier</source><title>Re: Rechercher une chaîne dans un fichier</title></item></channel></rss>
