After winding up on a question where literally every related question had the title "regular expression help" (with some variations in case and number of exclamation points) I kind of went on a crusade to give these questions distinct names. But I can't do it alone, there's just too many of them! Dive in and fix some titles!

enter image description here

When they all have the same title:

  1. you can't find the right dupe to "close as duplicate" even though you know there's dozens of them
  2. the people asking questions can't find the relevant dupes, leading to even more dupes
  3. GOTO 1

I'd suspect this also hinders search engines trying to index them. This problem appears prevalent enough to even warrant an automated quality-control check for titles like /(php|javascript|perl)? (regular[- ]expression|regex) help/.

And if any diamond mods wanted to go through and close all the regex questions about parsing html/xml as duplicates of this one that'd do a lot of good too.

Duplicates of RegEx match open tags except XHTML self-contained tags

(or if you prefer, Can you provide some examples of why it is hard to parse XML and HTML with a regex?)

Questions about email addresses and regular expressions can be closed as duplicates of What is the best regular expression for validating email addresses?

  • +1: I often find that questions asking with "regular expression" in the title don't actually require regular expressions in the answers at all. Two problems, and all that! – Johnsyweb Jul 9 '11 at 5:29
  • 2
    Post a list of the questions you want to see get closed in your answer. I guarantee that your fellow Meta users will close them just as quickly as any moderator. And we'll have a lot more fun doing it, too. – Cody Gray Jul 9 '11 at 5:32
  • Added some questions to close. If anyone finds a good "master" question for parsing email addresses with regexs, post a link – Brad Mace Jul 9 '11 at 5:58
  • 13
    This is indeed a noble mission, and good titles is probably the #1 best edit per byte you can make on a question. +1 HAS MY FULL SUPPORT – Jeff Atwood Jul 9 '11 at 6:00
  • 25
  • 1
    @YiJiang - welcome to our support group – Brad Mace Jul 9 '11 at 6:27
  • 5
    @YiJiang - It's actually worse than either of us realized. They've actually been producing hybrid offspring: Help with JavaScript Regular Expression – Brad Mace Jul 9 '11 at 6:33
  • 1
    This is...actually more difficult than it seems trying to come up with accurate titles. Especially when the question is unclear. – Troyen Jul 9 '11 at 6:34
  • 2
    @Troyen - yes, some would ultimately be better off closed. But there's still a lot of room between the "perfect title" and "fix mah regex, lol!!1eleventy!" for useful improvements – Brad Mace Jul 9 '11 at 6:38
  • If you find questions about "how does this regex work", consider closing as "too localized" (at least for the more convoluted ones). – Brad Mace Jul 9 '11 at 6:49
  • 1
    Following up on Jeff's edit - if you need a soundtrack I recommend Dethklok's The Lost Vikings. Listening to that while looking at that picture is really ... you'll just have to take my word for it. – Brad Mace Jul 9 '11 at 7:27
  • 10
    "Conan! What is best in life?" "To crush your enemies, see them driven before you, and to hear the lamentation of their women. And to have a usefully indexed and properly searchable archive of regex questions." – razlebe Jul 9 '11 at 7:32
  • 3
    As usual I'm taking exception that the joke answer should serve as close target here. Just because it's popular doesn't mean it's correct or even on-topic. – mario Jul 9 '11 at 10:23
  • Also many people have questions about regular expressions... – sth Jul 9 '11 at 13:07

There are a number of vaguely related issues - one of them is common misspellings. For example:

  • 'javscript' (about 530 left, but beware: in a few cases, the misspelling is the crux of the question and simply fixing it makes a nonsense of the question or the answers).

  • 'mecurial' (about 50 left).

I've had a couple of binges working on 'javscript', but there's still a lot to do. Of course, mere mortals cannot fix up comments, so a few of the misspellings will remain.

| improve this answer | |
  • 1
    hmm. Good point -- we should automagically fix all common spelling errors in titles via SQL; can you update your post with some examples and I will make that happen over the weekend? – Jeff Atwood Jul 9 '11 at 6:17
  • @Jeff, I just went through the 11 (x 50 lines) pages of Javscript and 1 page of Mecurial misspellings, and none of them are left in the titles. The problems are in the question body or the answers. I was alerted to the issue at all by reviewing and approving someone else's edits of these names. – Jonathan Leffler Jul 9 '11 at 6:26
  • I fixed like 5 misspellings of 'javacsript' a few hours ago. And I'm sure there are many other ways its misspelled too. – bkaid Jul 9 '11 at 7:38
  • 3
    @Jeff: I don't think an automagical fix is the best way to to this ("in a few cases, the misspelling is the crux of the question"). Maybe you should implement it as a site-specific spellchecker? So that the user still has control over the message, and can override incorrect fixes? – Jan Fabry Jul 9 '11 at 11:37

I don't think thats a particularly suitable question to use as the duplicate - it doesn't actually answer any of those questions.

Whats needed is a question (and answer) which explains:

  • Why parsing HTML using regualr expressions is a bad idea
  • How HTML should be parsed (which is dependent on the framework you are using)
  • Some guidance on how parse HTML with regular expressions for the cases where you want a quick and dirty solution

I've had a quick look but I'm really struggling to find a question which meets these criteria

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged .