-4

Actually i am just beginer to learn regex but now i have a problem. Can somebody help me to create regex for the follwing condtions:

  1. Text lenght should be 6
  2. 1st character should be in Caps
  3. 2nd character should be in lower
  4. 3rd character should be numeric
  5. 4th character should be in lower again
  6. 5th character should be in Caps again
  7. 6th character should be in numeric again
  8. But shouldn't contain any special character
Rahul
  • 5
  • 3
  • 1
    Looks like you are looking to create a regex, but do not know where to get started. Please check [Reference - What does this regex mean](https://stackoverflow.com/questions/22937618) resource, it has plenty of hints. Also, refer to [Learning Regular Expressions](https://stackoverflow.com/questions/4736) post for some basic regex info. Once you get some expression ready and still have issues with the solution, please edit the question with the latest details and we'll be glad to help you fix the problem. – Wiktor Stribiżew May 06 '20 at 08:52
  • https://regex101.com/ also has a pretty good tester to help – Sami May 06 '20 at 08:59
  • 1
    I will recommend https://regexone.com/ as a first step. It's interactive, a ludic way to gain a grasp the basics. – Drag and Drop May 06 '20 at 09:00

1 Answers1

-1

You can do it pretty easily.

([A-Z][a-z]\d{1}[a-z][A-Z]\d{1})
Marvin Klein
  • 381
  • 1
  • 13
  • Hi Marvin Klein. Thank you so much. only lenght is still not validate but no problem. your solution is really work. – Rahul May 06 '20 at 09:09
  • You can play with Regex very easily on https://regex101.com/ There you can find some useful examples :) – Marvin Klein May 06 '20 at 09:11