I would hazard in general that there are going to be a significant number of 
isomorphic regular expressions. Searching for whether anyone has looked into 
this, I found this exchange where the same question you pose is discussed.

http://stackoverflow.com/questions/9607062/library-to-check-if-two-regular-expressions-are-equal-isomorphic
 
<http://stackoverflow.com/questions/9607062/library-to-check-if-two-regular-expressions-are-equal-isomorphic>

[fletcher]


> On May 9, 2017, at 6:06 AM, Jean-Christophe Helary 
> <[email protected]> wrote:
> 
> David,
> 
> Thank you for your reply.
> 
>> On May 9, 2017, at 20:05, Dave <[email protected]> wrote:
>> 
>> Parsimony aside, since the pipe defines alternative patterns, there is no 
>> way to create patterns like (dog|cat) using character classes. 
> 
> Hence the question "I'm wondering if [] and | are equivalent for *single 
> characters*". (emphasis added).
> 
> So the question is, for any arbitrary a and b, are [ab] and a|b logically 
> equivalent, or are there cases for some a and b where it is not the case?
> 
> Jean-Christophe
> 
>> 
>> On Monday, May 8, 2017 at 10:10:45 PM UTC-4, Jean-Christophe Helary wrote:
>> I'm wondering if [] and | are equivalent for single characters or if there 
>> are marginal cases where they would not be equivalent ? 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "[email protected]" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/bbedit.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to