J
Jarod Zhu
Hi, all
In my project, there are some rules using global expression( '*'
as one or more characters ) to match some functions' output.
Such as:
rule1$B!'(B the * apple (will match the output "the red apple")
rule2$B!'(B the * + * game (will match the output "the wonderful +
successful game")
I want to use ruby to realize the match check, but I only know
ruby supports regular expression.
So I have to change rules to the form of regular expressions( "*" => ".
+" and add '\' to other regular expession keywords like '+', '.' etc.)
Is there any way to use global expression directly in ruby?
Thanks
In my project, there are some rules using global expression( '*'
as one or more characters ) to match some functions' output.
Such as:
rule1$B!'(B the * apple (will match the output "the red apple")
rule2$B!'(B the * + * game (will match the output "the wonderful +
successful game")
I want to use ruby to realize the match check, but I only know
ruby supports regular expression.
So I have to change rules to the form of regular expressions( "*" => ".
+" and add '\' to other regular expession keywords like '+', '.' etc.)
Is there any way to use global expression directly in ruby?
Thanks