In my project, there are some rules using global expression( '*'
as one or more characters ) to match some functions’ output.
rule1e$B!'e(B the * apple (will match the output “the red
rule2e$B!'e(B the * + * game (will match the output “the
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?