Skip to main content
Solved

REGEX Building

  • 21 May 2024
  • 2 replies
  • 38 views

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. 

 

2 replies

Userlevel 6
Badge +22

Hi @kpope 

^\d{4}

This will select the first 4 digits.

Badge +4

Thank you! 

Reply