Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7613469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:09:45+00:00 2026-05-31T02:09:45+00:00

I making a simple chat application, and I need to write a claas that

  • 0

I making a simple chat application, and I need to write a claas that creates user nickname.
for example: NickName nm = NewNickname (“john123”);
So, If the name is wrong (unacceptable) it should throw an exception.

Limiations:
– minimum 4 chars
– maximum 12 char (simple Length check)
– only letter and digits
– must start from letter

Now my conception is just use for loop and check every char for letter/digit etc.

But I ask, is any simple Regex (?) method to achieve this? I have no time to learn
all these regex tricks, because i have limited time (and it looks very complicated) 😛

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:09:47+00:00Added an answer on May 31, 2026 at 2:09 am

    Regular Expression: “^[a-zA-Z][a-zA-Z0-9]{3,11}$”

    So start with a letter (lowercase or uppercase) [a-zA-Z], then between 3 and 11 letters or numbers, so [a-zA-Z0-9]{3,11}. ^ means beginning of string, $ means end of string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making simple application that will take hotel name and price of item,
I am making a simple chat application and I am trying to find out
I'm making simple php chat, and i need to refresh messages in one div.I
I making simple silverlight application. I need to access and use an image from
I am making simple AS3 application that will record audio from microphone and after
in making a simple cgi server for a course. To do that in some
I am making a simple byte buffer that stores its data in a char
I'm making a simple chat program for me and my friends as a tech
I am making a TCP chat server from a simple tutorial I found and
I am making simple one on server side & one on client side application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.