In Pdf i am reading each page and extracting data . There are multiple pages ,based on receipt number i need to split pdf. Receipt num contains 25 digits ie NSCI129NSCI12000020257668.Can you help getting number with regex come times I is reading as1

In Pdf i am reading each page and extracting data . There are multiple pages ,based on receipt number i need to split pdf. Receipt num contains 25 digits ie NSCI129NSCI12000020257668.Can you help getting number with regex come times I is reading as1.
Ineed regex for 25 digit .
first 4 characters are alphabets and last 14 are digits.

@MitheshBolla

Try below Regex.

  1. If First 4 characters are always in Caps then try below Regex.

                          [A-Z]{4}[a-zA-Z0-9]{7}[0-9]{14}
    
  2. If first 4 charcters are combination of both lower and upper then try below Regex.

                          [A-Za-z]{4}[a-zA-Z0-9]{7}[0-9]{14}
    
1 Like

can we combine two expessions ?
if i keep seperate both are working well. when i combine its not extracting both.

@MitheshBolla

Use two regular expressions separately to fetch the required value and then combine both values together using plus + operator.

cant we write in single expression to fetch two seperate data?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.