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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:40:16+00:00 2026-05-11T19:40:16+00:00

It is clear that there are lots of problems that look like a simple

  • 0

It is clear that there are lots of problems that look like a simple regex expression will solve, but which prove to be very hard to solve with regex.

So how does someone that is not an expert in regex, know if he/she should be learning regex to solve a given problem?

(See “Regex to parse C# source code to find all strings” for way I am asking this question.)

This seems to sums it up well:

Some people, when confronted with a problem, think “I know, I’ll use
regular expressions.”
Now they have two problems…

(I have just changed the title of the question to make it more specific, as some of the problems with Regex in C# are solved in Perl and JScript, for example the fact that the two levels of quoting makes a Regex so unreadable.)

  • 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-11T19:40:16+00:00Added an answer on May 11, 2026 at 7:40 pm

    Don’t try to use regex to parse hierarchical text like program source (or nested XML): they are proven to be not powerful enough for that, for example, they can’t, for a string of parens, figure out whether they’re balanced or not.

    Use parser generators (or similar technologies) for that.

    Also, I’d not recommend using regex to validate data with strict formal standards, like e-mail addresses.
    They’re harder than you want, and you’ll either have unaccurate or a very long regex.

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

Sidebar

Related Questions

I found that there's a clearRect() method, but can't find any to clear an
The javascript one seems pretty simple, just localStorage.clear(). Is there anything similar to that
It's clear that Apple has an OpenCL implementation based on Clang and LLVM. There's
Now that it's clear what a metaclass is , there is an associated concept
Is there a way to enable exclusive checkouts on clear case? I want that
Are there any automated tools that will parse through XAML code and clean out
I will put my code in a simple way, but if any good soul
I have an app I'm designing that will allow for lots of PDF viewing.
Is there a function, that clears last line in command prompt? I dont mean
Is there a clean way of cloning a record in SQL that has an

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.