 US zip code or say US postal code allows both the 5 digit format and 9 digit formats but here last 4 digits including hyphen is optional So without thinking much let us write the rejects for this format Alright so here I have added some sample zip code in the input text Now here we want to match digit So to match the digit we have to use backslash D But before that let us assert the position at the beginning of this string by using carrot meta character Now in the US zip code the first set consists of 5 digit That means we want to match digit exactly 5 times So for that we need to use repeating quantifier like this And the second set consisting of hyphen and 4 digit character But as I said the second set consisting of 4 digit including hyphen are optional So let us add in one group by using parenthesis And let us use question mark character to make it optional And assert the end of the string by using dollar sign character So this is the working rejects to find the zip code Now let us understand this So here the first set allows or match 5 digits And for that we have used this expression And then there can be optional 4 digits number including hyphen But this part is optional So we have added it in one group and make it optional by using this expression Now let us find the zip using this rejects in PDF multi tool So let me open PDF multi tool Now let us open one sample PDF file Now in this PDF file the zip code is defined over here So to find it using rejects let us click on this link And it will open this pop up Now let me check this checkbox so that we can use regular expression Now let me copy paste the rejects which we have created over here Let us paste expression Now let us click on this find next button So yes as you can see that this tool is now matching this zip code over here Now let us move to the next demo Now let's say you have given requirement to check whether a user has entered a valid social security number in your application or not So this social security number are of 9 digit numbers in this format The first three digits are called area number The next two digits are called group number And the last four digits are serial numbers which range from 301 to 4 times 9 Now let us write the rejects to match SSN number Alright so here I have added some sample SSN number in the input text Here again we want to match the digit As SSN number consisting of digits So let us use the backslash d over here And let me add the meta character Carrot sign over here to define the starting position Now in the SSN number the first set consisting of three digits So let us use the repeating quantifier Like this Followed by hyphen The second set matches two digit number So for that use this expression followed by hyphen And the last set matches four digit So again backslash d In the repeating quantifier let me add four and end of the string So this way we have a working rejects to match SSN number Now let us try to understand this expression Now apart from this meta character carrot sign and dollar sign Which asset the position at the beginning and at the end of the string This rejects as I said can be broken into three sets separated by hyphen The first set allows or match three digit followed by hyphen Then there is a second set which match two digit numbers And the last set matches four digit number Now let us find the SSN number using this same rejects in PDF multi-tool Alright so in PDF multi-tool I have already Loaded one sample PDF file which contain SSN number over here and over here Let me click on this link and let me paste our SSN rejects over here Now let me click on this link So first SSN is matching over here And when I click again on this link It will highlight over here Third SSN highlight over here Fourth SSN over here So this way we can find the SSN number in PDF file using this tool Now let us move to the next demo