15
\$\begingroup\$

Are we allowed to ask questions just about regular expressions?

\$\endgroup\$
17
\$\begingroup\$

Technically, yes, but, different regex engines have slightly different rules, charsets, etc. Sometimes it is worth knowing the interpreter as well as the regex. So, yes, plain regex are on topic, but the more information you give, the better the results will be.

Additionally, surprisingly often, the right answer is to not use regex, and for those answers, it is better to know more about the problem, than the solution.

\$\endgroup\$
15
\$\begingroup\$

"Regular expressions" are too general a concept. Programming languages vary wildly in the features that are actually supported by their regular expression engines, as well as in their syntax. Therefore, you must specify a specific programming language in your question. A question that is purely about a "generic" regular expression would be hypothetical code, which is off-topic for Code Review.

\$\endgroup\$
  • \$\begingroup\$ So, if we provide the language we are working with regex in, it would be a valid question? \$\endgroup\$ – Ethan Bierlein Oct 1 '14 at 21:24
  • 2
    \$\begingroup\$ I think that would be fine. I suggest including the entire line of code that uses the regex. \$\endgroup\$ – 200_success Oct 1 '14 at 21:25

You must log in to answer this question.

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