-2

The regex should fulfill the below conditions:

  • Minimum of 3 characters (includes alphabets and numbers, not including Special Characters

)

  • It must have at least 3 compulsory alpha-numeric characters excluding special characters

  • All alphabets cannot be the same in a standalone word. However, if they are a part of the word, we will allow the same. For example -
    AAA is not allowed but Haaadoop is allowed

  • Consecutive alphabets less than or equal to 3 are allowed in a word. Ex– Haaadoop is allowed but Haaaadoop is not allowed.
  • Three or more consecutive Standalone alphabets are not allowed. Example - AA is allowed. AAA is not allowed.
  • All numbers can be the same. Example – 111 is allowed
  • If more than 1 special character (In a word or Standalone) are consecutively entered, it is invalid. Example A-B is allowed, A- -B or A-&B is not allowed

  • Allow special characters #&()_+[]:;',/.\-"*

  • Consecutive dashes, apostrophes are not allowed in any part of the string
  • It should accept these international and cyrilic characters as well ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞߟàáâãäåæçАаБбВвГгДдЕеЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯяèéêëìíîïðñòóôõöøùúûüýþÿ
  • These international and cyrilic characters should be accepted in starting of the word or in between of the words or in the end of the word
Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

^(?!(.)\1+$)(?!.([a-zA-Zа-яА-ЯÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞߟàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ])\2{3})(?!.([ '"-])\3)(?![a-zA-Zа-яА-ЯÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞߟàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ]\W{2})(?=.[a-zA-ZÀ-ÖØ-ߟà-çа-яА-ЯÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞߟàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿè-ÿ])(?!.[Pp]+(OST|ost).*\s*[Oo0](FFICE|ffice).*\s*[Bb].\s*[Oo0].\s*[Xx].*)[a-zA-ZÀ-ÖØ-ߟà-çа-яА-ЯÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞߟàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿè-ÿ0-9\ *"(:,/.\;&)[]_+#'-]{3,40}$

This worked for me