Page 1 of 1

Regexp and mount job

Posted: Wed Apr 29, 2020 10:40 am
by DamienB
Bonjour,
j'ai la ligne suivante et je veux capturer chaine de caractère composée de 6 chiffres… problème, il me faut la deuxième.

Toto_1359_885642_240578_853624-2

Dans Mount Job, si je saisie dans Nom du dossier de travail > Définir le texte d'une seule ligne avec des variables ceci :

Job > Name Proper > Search : [0-9]{6}

Je capture le premier match : 885642

Hors je veux capturer le second : 240578

Comment trouver la regex qui va bien ?

Re: Regexp and mount job

Posted: Wed Jun 10, 2020 10:48 am
by laurentd
You can not do this in one go, but here are 2 solutions:

Rename the job to the part you need using search and replace regex:
Search for regex .+_(\d{1,5})_(\d{6})_(\d{6})_.+ and replace with regex \3 (third captured string)
Set private data ID to the job's name: ID=[Job.NameProper], that's the info you need.
Rename the job back to its original name.

Or, more straightforward, use StringSplitter app.
https://www.enfocus.com/en/appstore/pro ... ngsplitter
 
StringSplitter.png
StringSplitter.png (98.41 KiB) Viewed 6883 times

Re: Regexp and mount job

Posted: Wed Jul 08, 2020 10:40 am
by DamienB
Thanks a lot late !

Because of Covid.