POV-Ray : Newsgroups : povray.off-topic : An even more interesting problem : Re: An even more interesting problem Server Time
28 Jul 2024 18:14:37 EDT (-0400)
  Re: An even more interesting problem  
From: Orchid Win7 v1
Date: 25 May 2013 07:00:33
Message: <51a099d1$1@news.povray.org>
>> Does there exist an algorithm to determine whether two regexes are
>> equivalent?
>
> Piece of cake:
>
> if( string RegExp1 == string RegExp2 ){
> printf( "They're equivalent!\n" );
> }else{
> printf( "They're not identically equivalent!\n" );
> }
>
> *wink*

Oh come on. You could at least parse the string into an AST and compare 
the two ASTs. :-P That would at least remove trivial differences like 
extra spaces and so on.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.