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 873367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:55:23+00:00 2026-05-15T10:55:23+00:00

How can I create a Regular expression to match the following characters: A-Z a-z

  • 0

How can I create a Regular expression to match the following characters:

A-Z a-z 0-9 " -  ? . ', !

… as well as new lines and spaces

  • 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-15T10:55:24+00:00Added an answer on May 15, 2026 at 10:55 am

    This will match any single one of those characters:

    [A-Za-z0-9"?.',! \n\r-]
    

    There’s a good chance you want something like:

    ^[A-Za-z0-9"?.',! \n\r-]+$
    

    Or possibly a bit simpler will meet your needs:

    ^[\w\s"?.',!-]+$
    

    Remembering that if this is inside a string, you will need to escape either the " or ' in that (either by doubling up, or by prefixing with a backslash).

    Also note that the - is last so that it is not treated as a range inside the character class. (Can also be placed first, or prefixed with backslash to prevent that).

    The \w will match a “word” character, which is almost always [A-Za-z0-9_].
    The \s will match a whitespace character, (i.e. space,tab,newline,carriage return).

    But really you need to give more context to what you’re trying to do so people can suggest more fitting solutions.

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

Sidebar

Related Questions

How can I create a regular expression that will grab delimited text from a
How can I create a regular expression to search strings with a given pattern?
How can I create a java regular expression for a comma separator list (3)
I'm trying to create regular expression that filters from the following partial text: amd64
Trying to create a simple regular expression that can extract numbers(between 7 - 14)
I'm trying to create a regular expression that will match the third instance of
I'm trying to create an svn pre-commit hook, but can't get my regular expression
Thinking about my other problem , i decided I can't even create a regular
I can create the following and reference it using area[0].states[0] area[0].cities[0] var area =
How can create a New user in ORACLE with full access (alter, delete, select,

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.