Information Technology Reference
In-Depth Information
Welcome to your Packer-built virtual machine.
[vagrant@default-centos65 ~]$
curl localhost:80
<html>
<body>
<pre><code>
This site was set up by default-centos65
My network addresses are:
* lo: ::1
* eth0: 10.0.2.15
* eth1: 192.168.33.38
</code></pre>
</body>
</html>
[vagrant@default-centos65 ~]$
exit
logout
Connection to 127.0.0.1 closed.
Once you have the program output in your host clipboard, paste it into the
test string
field as
shown in
Figure 16-11
.
Once you have a test string, you can enter in any regular expression between the forward
slash characters in the
Your regular expression
field. Once you enter a regular expression,
the Rubular site will show you if it would match any results in the test string.
Regular expressions containing strings without any special symbols will match the string it-
self. For more information about the special characters that can be used, refer to the
Regex
quick reference
section of the Rubular website, below the editing pane. As
Figure 16-12
shows, if we use the
eth1
regular expression and the program output contains
eth1
, we'll
get a match. And conversely, if the program output does not contain
eth1
, we won't get a
match. Thus, we make a match if the regular expression
eth1
against the program output of
curl localhost:80
on
stdout
is a success condition for our example.