I have PDF document, with information. I need only the number between [] in the document. For instance, [12223-23-56], print as 12223-23-56
I have PDF document, with information. I need only the number between [] in the document. For instance, [12223-23-56], print as 12223-23-56
In windows that's a one line command with xpdf pdftotext or use poppler utils but that is more than one.exe and you will need to modify the simple code you use to remove ends of strings.
pdftotext -layout "numbers in brackets text.pdf" text.txt & findstr /r [[0-9]] text.txt
if you only want those with - then filter first
>pdftotext -layout "numbers in brackets text.pdf" text.txt & findstr /r [[0-9]] text.txt|find "-"
[1-2-3]
[12223-23-56]
etc. but I have given enough hints to use in your required minimal attempt.