in reply to Re^2: contest problem about shortest Regular expression
in thread contest problem about shortest Regular expression

Ouch, you're right. I misread the assignment, I had the impression it wants the strings. OK, so you just want to optimize a finite automaton generated by joining all the input strings by | :-)

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^4: contest problem about shortest Regular expression
by rsFalse (Chaplain) on Nov 29, 2017 at 11:56 UTC
    Yes, and I still don't know how to optimize (to shorten) such long regex to the minimal. And have no clear idea.