in reply to Compare two regex patterns
I'm trying to figure out a way to compare each regex created to see if there is a possible dupe. Whey the \r\n? I need it there for the Perl Expect module. The data we are matching against comes in slowly and without Expect will not wait till the \n for $. Any idea on how to test this would be appreciated. I've tried Regexp::Compare, Regexp::ERE, and the Regexp debugger.^S.*$[\r\n] ^SYS.*$[\r\n]
Chris[root@host]# perl -Mre=debug -e '/12/'; Compiling REx "12" Final program: 1: EXACT <12> (3) 3: END (0) anchored "12" at 0 (checking anchored isall) minlen 2 Freeing REx: "12" [root@host]# perl -Mre=debug -e '/1+/'; Compiling REx "1+" Final program: 1: PLUS (4) 2: EXACT <1> (0) 4: END (0) anchored "1" at 0 (checking anchored) plus minlen 1 Freeing REx: "1+"
|
---|