Copy link to clipboard
Copied
Hello,
Hello, stupid question, I cannot find the correspondence of the recipient of the right indentation tab (^y/~y) for an expression in RegExp? (instead of the point)
lesPaginations[test01].paragraphs[0].contents.replace(/.\d+/g,''));
Thanks
Liphou
Ok. Got it. It should be the right indent tab followed by any number of digits:
var searchPattern = new RegExp( "\u0008" +"\\d+" , "g" );
lesPaginations[test01].paragraphs[0].contents.replace( searchPattern ,"" );
But as I already said:
You do not change something in the target paragraph.
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Hi Liphou,
what should work in this case with exactly this special character:
lesPaginations[test01].paragraphs[0].contents.replace(/.\d+/g,"\u0008"));
Note: With this code you will not change the actual contents of the addressed paragraph.
You "only" return the changed contents.
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Ok. Got it. It should be the right indent tab followed by any number of digits:
var searchPattern = new RegExp( "\u0008" +"\\d+" , "g" );
lesPaginations[test01].paragraphs[0].contents.replace( searchPattern ,"" );
But as I already said:
You do not change something in the target paragraph.
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Unhappy! do not move to the original text !! 😉
Indeed, I retrieve the text to do another search in another document.
Thank you so much
Malheureux ! ne pas bouger au texte original !! 😉
Effectivement, je recupère le texte pour y faire une autre recherche dans un autre documents.
Merci Beaucoup
Liphou
Copy link to clipboard
Copied
Ah. Still your TOC project…
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Yes, I had a big problem on a loop and wanted to rule out this imprint in the script to reduce sources of errors.