I create my regex preg for my perl program see what i got

the goal of this code is match this question sample:Code:/^.*:\s+.*.?(one|two|thrêe|föûr|fïve|sïx|sêvên|eïght|nïne|one|two|three|four|five|six|seven|eight|nine).?.*\s*$/i

Question:

Unknown: @sone_d

Answer:

Unknown: one

will read theoneonly.. i got it perfect and match it but when i put all the expression with this . and * before and after the parenthisis to disregard the excess characters and putting to all my regex i got a conflict and answering incorrect like this.

sample the question is @_onedda and the answer 10. but when i put to only on the 3 regex they answer perfect but when i put to all. got an giving a wrong answer.

here's my whole codes so you can analyze.

Code:automacro XX{ console /^.*:\s+.*.?(twênty|thïrty|förty|fïfty|sïxty|sêvêntÿ|eightÿ|ninêtÿ|twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety).?.*\s+.*.?(one|two|thrêe|föûr|fïve|sïx|sêvên|eïght|nïne|one|two|three|four|five|six|seven|eight|nine).?.*\s*$/i call XX } macro XX{ [ $t = @eval({"twenty" => 20,"thirty" => 30,"forty" => 40,"fifty" => 50,"sixty" => 60,"seventy" => 70,"eighty" => 80,"ninety" => 90,"twênty" => 20,"thïrty" => 30,"förty" => 40,"fïfty" => 50,"sïxty" => 60,"sêvêntÿ" => 70,"eightÿ" => 80,"ninêtÿ" => 90}->{"$.lastMatch1"}) $o = @eval({"one" => 1,"two" => 2,"thrêe" => 3,"föûr" => 4,"fïve" => 5,"sïx" => 6,"sêvên" => 7,"eïght" => 8,"nïne" => 9,"three" => 3,"four" => 4,"five" => 5,"six" => 6,"seven" => 7,"eight" => 8,"nine" => 9}->{"$.lastMatch2"}) $res = @eval($t + $o) ] log -o--o--o--o--o- $res -o--o--o--o--o- pause 5 do talk num $res } automacro YY{ console /^.*:\s+.*.?(tên|elêvên|twêlve|thïrtêên|föûrtêên|fïftêên|sïxtêên|sêvêntêên|eïghtêên|nïnêtêên|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen).?.*\s*$/i call YY } macro YY{ [ $res = @eval({"ten" => 10,"eleven" => 11,"twelve" => 12,"thirteen" => 13,"fourteen" => 14,"fifteen" => 15,"sixteen" => 16,"seventeen" => 17,"eighteen" => 18,"nineteen" => 19,"tên" => 10,"elêvên" => 11,"twêlve" => 12,"thïrtêên" => 13,"föûrtêên" => 14,"fïftêên" => 15,"sïxtêên" => 16,"sêvêntêên" => 17,"eïghtêên" => 18,"nïnêtêên" => 19}->{"$.lastMatch1"}) ] log -o--o--o--o--o- $res -o--o--o--o--o- pause 5 do talk num $res } automacro X0{ console /^.*:\s+.*.?(twênty|thïrty|förty|fïfty|sïxty|sêvêntÿ|eightÿ|ninêtÿ|twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety).?.*\s*$/i call X0 } macro X0{ [ $res = @eval({"twenty" => 20,"thirty" => 30,"forty" => 40,"fifty" => 50,"sixty" => 60,"seventy" => 70,"eighty" => 80,"ninety" => 90,"twênty" => 20,"thïrty" => 30,"förty" => 40,"fïfty" => 50,"sïxty" => 60,"sêvêntÿ" => 70,"eightÿ" => 80,"ninêtÿ" => 90}->{"$.lastMatch1"}) ] log -o--o--o--o--o- $res -o--o--o--o--o- pause 5 do talk num $res } automacro X{ console /^.*:\s+.*.?(one|two|thrêe|föûr|fïve|sïx|sêvên|eïght|nïne|one|two|three|four|five|six|seven|eight|nine).?.*\s*$/i call X } macro X{ [ $res = @eval({"one" => 1,"two" => 2,"thrêe" => 3,"föûr" => 4,"fïve" => 5,"sïx" => 6,"sêvên" => 7,"eïght" => 8,"nïne" => 9,"three" => 3,"four" => 4,"five" => 5,"six" => 6,"seven" => 7,"eight" => 8,"nine" => 9}->{"$.lastMatch1"}) ] log -o--o--o--o--o- $res -o--o--o--o--o- pause 5 do talk num $res }

the highlighted above is the regex. please help me guys i been working this a month until now cant solve my proble.

Tweet This+ 1 thisPost To Linkedin