title: How to write python function to test the matched strings (to use for Robot framework keyword)?
body: <p>I am writing a custom library for robot framework in python. I don't want to use builtin library for some reasons.</p>
  
  <p>My python code :</p>
  
  <pre><code>import os
  import re
  
  output = "IP address is 1.1.1.1"
  
  def find_ip():
      cmd = 'ipconfig'
      output = os.popen(cmd).read()
      match1 = re.findall('.* (1.1.1.1).*',output)
      mat1 = ['1.1.1.1']
      if match1 == mat1:
          print "PASS"
  </code></pre>
  
  <p>In the above program I have written python function to :</p>
  
  <ol>
  <li>Execute a windows command "ipconfig"</li>
  <li>Written regular expression to match 1.1.1.1</li>
  <li>create a list variable, mat1 = ['1.1.1.1']</li>
  </ol>
  
  <p>Now I want to put condition like, if "match1" and "mat1" are equal my TEST should PASS. else it should fail in Robot framework.</p>
  
  <p>Any one please give idea on how to write python function for this purpose?</p>
  
  <p>Please note I dont want to use "Should Match Regexp" keyword in Robot Framework. Because I know it will do the same whatever I am asking.</p>