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

  • SEARCH
  • Home
  • 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 8718567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:35:01+00:00 2026-06-13T06:35:01+00:00

I want to create a regular expression for subdomain like: In the textbox user

  • 0

I want to create a regular expression for subdomain like:

In the textbox user need to enter like

abc1.test.com

or

abc1s.test.com

Note: .test.com is always required at the end.

The variable part can contain any letter, alphabets etc

I dont know anything about regex so i ask this silly question. I googled it for more than 2 hours but dont find any good example.

Please note this is not a homework.

Any help is highly appreciated.

  • 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-06-13T06:35:02+00:00Added an answer on June 13, 2026 at 6:35 am

    There are a number of useful resources on regex online, including:

    • http://regexpal.com/ – test out your regex
    • http://www.regular-expressions.info/reference.html – regex reference
    • http://www.addedbytes.com/cheat-sheets/regular-expressions-cheat-sheet/ – useful cheat sheet

    I am sure other members will have better resources but these have sufficed for me in the past.

    The following regex should work for you:

    ^((.+)(.test.com){1})$
    
    • the ‘.’ is any character except new line
    • the ‘+’ is one or more times
    • the ‘{1}’ is exactly once
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a regular expression for python snippet. import re pattern =
I want to create a regular expression where only numbers are allowed with max
I want to create a regular expression that matches input text that starts with
I want to create a regular expression for strings which uses special characters [
I'm learning regular expressions and want to help me to create a regular expression
I would like to create a regular expression pattern that would succeed in matching
On the following two strings I'd like to create a regular expression that returns
I need some help with a regular expression to limit the choices a user
I'd like to create a regular expression such that when I compare the a
I want to create regular expression for password that has length of atleast 6

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.