2
\$\begingroup\$

Today I have asked a question here on PPCG.

The question consisted in a set of wildcards and groups which one should make a string that matches it.

The question can be found here: String generator based on a wildcard

But it was immediately closed by another used as being a duplicate of the following question: Regex in reverse - decompose regular expressions.

Although the questions seem similar in the title, their content is WAY different!

One is actually to, receive as input, a regex and then generate a string that matches it.
The whole specification is found on the question.

My question is to generate a string that matches some features of a regex, but a regex will be considered invalid input in most of the cases.
Evaluating the wildcard as a regex, using my specification, would (in some cases) generate meaningless matches.

None of the answers will fit into my question, with most of the possible wildcards (like ?[def]{2} which would, for example, generate add while it is an improper regex).
Most of those answers also generate characters outside the expected range of a-z, A-Z and 0-9 (symbols are optional and are rewarded with bonus).

To the core of this: Is my challenge really THAT close to be considered duplicate?

It wasn't intentional and I wasn't aware of the other linked question, which was 8 month ago.


Outside of the scope, I have seen questions being reopened because the winning criteria changed, but the whole question itself was much more similar.
I might be wrong about it, my memory isn't 100% perfect.

\$\endgroup\$

1 Answer 1

6
\$\begingroup\$

Personally, I agree with the close vote. Yes, there are some differences in the syntax, so no answer could be copied over directly. But the differences seem very minor, if someone did adapt an old answer, the heavy lifting would have been done by the user who answered the previous question. It's mostly just changing a bit of syntax, and throwing out a feature or two and adding another. The fact that the old question wants all strings and you want one random string also doesn't really affect the core of the challenge.

I can only recommend you try the sandbox next time or ask in chat, so you can get feedback before you commit to the challenge, which might have turned up that previous challenge.

\$\endgroup\$
5
  • \$\begingroup\$ It might seem that easy, but it won't. Changing a bit of syntax won't suffice since the generated output would be incompatible. Also, the way most things are interpreted on that question is completely different. Yes, there are things like character classes and quantifiers, but, as you said, the answers need to be adapted and changed to fit into this question. If the question is actually duplicated, shouldn't their answers be perfect fits for the question? \$\endgroup\$ Commented Dec 27, 2014 at 1:22
  • \$\begingroup\$ @IsmaelMiguel No they don't need to be perfect fits. If we had a question "Print all even numbers up to n." then "Print all odd numbers up to n." would still be a duplicate of that. I can't tell you more than my opinion: the core algorithm between the challenges will be identical, with the differences being merely cosmetic. \$\endgroup\$ Commented Dec 27, 2014 at 1:26
  • \$\begingroup\$ Actually, the syntax would change and the returned result would be different. Even though that most of the code is the same, the functionality is totally different. \$\endgroup\$ Commented Dec 27, 2014 at 1:29
  • 2
    \$\begingroup\$ @IsmaelMiguel "most of the code is the same" is the only thing that's relevant to being a duplicate in my opinion. \$\endgroup\$ Commented Dec 27, 2014 at 1:30
  • \$\begingroup\$ The similarities would be simply structural code. We both know those require 2 different methods to print the numbers and the returned result is incompatible. \$\endgroup\$ Commented Dec 27, 2014 at 1:32

You must log in to answer this question.

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