I need all the possible combinations alphabets, numbers (a-z0-9) , _(underscore) and .(dot) which must satisfy the below conditions

Please use between 6 and 30 characters.
Please use only letters (a-z), numbers(0-9)
The first character should be a letter (a-z) or number.
The last character a letter (a-z) or number.


Please refer to the rules, the forums are designed for people to help with code however you must put in the work yourself if you want people to spend the time and help you.

When you have some code to show, people shall be more than happy to look it over.

It means that not only will you learn how to code more effectively by writing it yourself, but also stops people asking others to do their homework etc.

An idea:

Create arrays containing for example a-z or 0-9. Create a function that randomly selects an array key. Then create a loop that executes this function 6-30 times.

This article has been dead for over six months. Start a new discussion instead.