title: Using looking-at in Emacs Lisp
body: <p>I am trying to replace some text starting with a dot and ending with a dot or an equal sign. For example <code>a.test=3</code>. I would like to replace this with <code>a['test']=</code> (conversion from Matlab to Python).</p>
  
  <p>I tested the <code>looking-at</code> function in Emacs Lisp:</p>
  
  <pre><code>(defun test-la ()
    (interactive)
    (when (looking-at "\\.\\(.*?)\\)[=.]")
      (message "ok")))
  </code></pre>
  
  <p>But when the point is on a dot, it is not showing <code>"ok"</code>..</p>