Home > Software engineering >  Regular expression in spring boot and angular
Regular expression in spring boot and angular

Time:09-16

I am working on a project and I need the regular expressions to validate some data.

Here is what I want to obtain:

A character string which only begins with a letter between A z, and which is at least two characters long and at most 80, which can contain digits from 0 to 9 inside the string or at the end, and spaces inside too but which does not contain special characters like: #$%@^& =£µ?=.*!

Example: this is the formats that i want to validate. Amanda1 test9 or Amanda 5 or Amanda

Thanks for your contribution

CodePudding user response:

You can use this pattern

/^[A-Za-z][\w\s\]]{1,79}/
  • Related