1

I'm considering using a nontrivial Regex expression example I found online in a commercial product. The original page has no info on licensing.

I guess a regex is arguably executable code (or a court instance could be persuaded in this direction).

Do you know any examples of copyrighted regex expressions (or any counter-example to regexes being covered by a license)?

closed as off-topic by Zimm i48, amon, Thomas Owens, curiousdannii, RubberDuck Mar 30 '17 at 1:05

  • This question does not appear to relate to open source, within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    I'm voting to close this question as off-topic because this is not about open source at all but a law question about what can be copyrighted. Thus it belongs to Law SE and should be migrated there. – Zimm i48 Mar 27 '17 at 11:43
  • 1
    Rule of thumb: If you consider it worth copying (over making it yourself) it is likely non-trivial enough to be eligible for copyright. – Philipp Mar 27 '17 at 15:13
  • 1
    @Zimmi48 I've got to say, I kinda disagree with you here. We see tons of questions over "can this be licensed?" and heck, regex is clearly something you'd see in open source. If you see regex in a project, it's a perfectly valid question to ask: "is the regex under GPL, or can it not be copyrighted?" In such a case, the question applies both to Law and Open Source, and because of that, I'm unwilling to migrate as I believe it's on-topic here. If the question eventually gets closed, then I'll send it over :) – Zizouz212 Mar 28 '17 at 2:25
  • 3
    @Zizou212 would the OP have said "I found it in a GPL program" or "Can I copy it in my open source program" I would indeed consider the question on-topic but there is no relation whatsoever to open source in the current formulation. – Zimm i48 Mar 28 '17 at 6:34
1

The >>idea<< of the regex can't be copyrighted (though it could conceivably be patented, but that's real unlikely to be the case), only its particular >>expression<< (its particular syntax). And there's usually more than one way to construct a regex that does the same thing. So if you're really concerned, just use the idea and rewrite it a little differently, e.g., to rewrite or not to rewrite, that is the question.

0

There are a number of things to consider:

  1. Have you contacted the original author(s) to ask them if you can re-use it and under what terms? - They may just say yes, ask for attribution, ask for a fee that you would be willing to pay or agree to release it under an Open Source licence that is also compatible with commercial use. Many of us are just happy to see clever things that we came up with re-used.
  2. How hard would it be for you to come up with your own version, not by changing theirs but possibly by testing against theirs given that you know it is possible to do this by a regex. Keep this in mind if you end up negotiating on price/use.
  3. Did the original page &/or site assert any of licence, copyright, confidentiality or patent on the regex, or code, on the site? - If it did not then they cannot patent in most places as they have already published. If they published it without asserting copyright then technically they have released it into the wild with default copyright and licence which I am told is "all rights reserved". It is worth a thorough look at the site that you found the code on as you may find that there is a default licence applied to all content on the site as there is for all code on the Stack Overflow site(s) for example.

N.B. I am not a lawyer or legal expert in any country, let alone wherever you are - the above is my personal opinion based on past experiences and reading.

  • 4
    Copyright exists automatically, and does not have to be asserted explicitly. The default license is “all rights reserved”. Automatic copyright is codified internationally in the Berne convention. Therefore, the conclusion of your third point is very incorrect, please edit it accordingly. Your other points – asking the author for permission or reverse-engineering the program – are good suggestions, though. – amon Mar 27 '17 at 8:44
  • @amon - point 3 updated and expanded to include the fact that there may be a default licence on the site content. – Steve Barnes Mar 27 '17 at 12:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.