Regex for finding bullet point like 1. 2. etc

I am facing issue searching for only bulleted content in the whole PDF document.
For eg. it should consider 1. xxx , 2. xxxx but not 2018. or xxx 2016.

I tried ([0-9]+. )(.*?)(?=([\d]+.)|($)) but it is also returning 2018. gfd in below list.

  1. fdsfsdf
  2. fgfdg
  3. bvb
  4. gfd

If anyone having idea on this please reply.

@pallavi05 Try below Pattern

If only alphabets will come after dot(.) use below pattern.

   [0-9]+(.\s)[A-z]+

After dot(.) if you get both alphabets and digits use below pattern.

 [0-9]+(.\s)[A-z0-9]+
1 Like

@Manjuts90 Thanks for your reply.
I tried regex shared by you but is not giving correct output and also considering words like 2017.,211. etc.
Below is the sample input
“1. An independent, retrospective review of all complaints and associated investigations for batches within expiry.• An independent, retrospective review of all investigations into batch rejects and critical defects since September 1,2016. 2. Your firm’s quality control unit failed to test process (21 CFR 211.110©). You failed for the manufacture of (b)(4) tablets. Change Control CC/16/284, completed February 2, 2017., required that”

@pallavi05 Can you tell expected output from above input?

Hello Pallavi05,

Use this Regex:
[0-9]{1}[.][\s][\D]

1 Like

Hi,
Below is the expected out put from above input

  1. An independent, retrospective review of all complaints and associated investigations for batches within expiry.• An independent, retrospective review of all investigations into batch rejects and critical defects since September 1,2016.

  2. Your firm’s quality control unit failed to test process (21 CFR 211.110©). You failed for the manufacture of (b)(4) tablets. Change Control CC/16/284, completed February 2, 2017., required that”

No it is not giving expected output.
Thanks.