> Net::Telnet, and I want to match several possible strings that would make
up
> the prompts. An explanation below:
>
> '/br[0-9][0-9]/' "or" '/mar[0-9][0-9]/' "or" '/tr[0-9][0-9]/' "or"
> '/ber[0-9]/'
>
One way is:
if($string =~ /(?:b|t|be|ma)r[0-9]{2}/) {
...
}
The operative operator
I am trying to figure out how to specify "or" in a regular expression.
Basically, I am specifying the Prompt portion of a telnet session using
Net::Telnet, and I want to match several possible strings that would make up
the prompts. An explanation below:
'/br[0-9][0-9]/' "or" '/mar[0-9][0-9]/' "o