Skip to main content

REGEX Building - I need help/to learn how to build these patterns. 

For this project, I have a pdf in a doclib. 

Filename: 0000_2025-2025TypeofDoc.pdf. 

I need the Pattern to extract the 4 numbers at the beginning of the filename. 

>^/]{4}  is what I have, which is either wrong or incomplete. 

 

Hi @kpope 

^\d{4}

This will select the first 4 digits.


Thank you! 


Reply