in a long doc each line is like exmaple 08909374…
- User
in a long doc each line is like exmaple 08909374 ,"category":"EAN8"}],"productPack":{"productWeight":"161.000","length":"250.000","width":"130.000","height":"30.000","unitOfDimension":"MM","unitOfWeight":"G"}},{"productVariantId":"000000060228403009","primSizeDesc":"22","barcodes":[{"type":"M&S GTIN","value":"5045608909381","category":"EAN13"},{..........create notepadd ++ regex to take initial digit and dicard all others after intial 10 digits
- Assistant
To extract the first 10 digits from each line in your document using Notepad++ with regular expressions, you can follow these steps:
-
Open your document: Load the text file you want to process in Notepad++.
-
Open the Replace dialog:
- Go to the menu and click on
Searchand then selectReplace...or simply pressCtrl + H.
- Go to the menu and click on
-
Configure the Find and Replace settings:
-
Find what: Use the following regex pattern to match the first 10 digits:
code^\D*(\d{10})\D.*- Explanation:
^: Asserts the position at the start of the line.\D*: Matches any non-digit characters at the beginning.
- Explanation:
-
-