6
\$\begingroup\$

I could have avoided asking a duplicated question had I been able to use extended regular expressions.

Duplicated question is What is the origin of the "r" in resistance measurements?

Had I been able to search for answers using an expression akin to:

\b[0-9]+R[0-9]+\b

then I might have seen the other answer and not added the duplicate question.

Is there a way to do that within the Stack Exchange?

| |
\$\endgroup\$
  • 3
    \$\begingroup\$ Nice idea! You'll get a better response on Meta.SO I think, this is network-wide. \$\endgroup\$ – user17592 Mar 17 '13 at 7:16
3
\$\begingroup\$

Yes and no.

You can use Stack Exchange Data Explorer to run arbitrary SQL queries (read-only, of course) against any site in the network.

However, Stack Exchange uses Microsoft SQL Server which doesn't support regular expressions. The closest you'll get is some very limited pattern matching (LIKE syntax). Even the simple regular expression you suggest can't be expressed with the limited syntax, though.

Stack Exchange does offer a few APIs that you might be able to use to do this: http://api.stackexchange.com/. I haven't looked at the API at all, so I'm not sure if it has the same limitation as the Data Explorer (or what is possible with it).

You could always query a larger, unfiltered data set from the API(s) and filter it with regular expressions on the client side (i.e. your own application).

I agree with Keelan that you should ask this at SO Meta. Data Explorer is cared for by SQL ninjas, so I'm sure they can provide a definite answer/maybe even offer to implement the feature :)

| |
\$\endgroup\$
  • \$\begingroup\$ Thanks. I marked this as the answer. I should have been a bit more clear in my question in that I wanted a way to do this from the existing website, not via having to code up something using API's, therefore the answer is actually "no" or at least not yet. \$\endgroup\$ – bgoodr Mar 18 '13 at 20:12
  • \$\begingroup\$ @bgoodr: You're welcome! You should try asking on Meta - they might be able to implement this. I can ask if you'd prefer. \$\endgroup\$ – Chris Laplante Mar 18 '13 at 21:14

You must log in to answer this question.

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