Check if in string there are 18 digits


I have to check if string contains a substring that has 18 numbers. I tried with is Match but with no result.

String Example:

Test test 111111111111111111 test test

1 Like

@camaro123 You can use regex.ismatch so it will give Boolean result


1 Like

Hi thanks. Do You know how to do same thing for date with pattern DD-MM-YYYY ?

1 Like

Do you want identify date from string?

actually I need also the bool if it exist in the string

1 Like

Than you can use this regex

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