       text = editor.getTextInBufferRange(range)
       #console.log text
       text = text.replace(/^\s+/, "").replace(/\s+$/, "")
+
+      # python regex
+      m = /^r('''|"""|"|')(.*)\1$/.exec(text)
+      if m?
+        text = m[2]
+
       #if te
       m = /^\/\/\/(.*)\/\/\/\w*$/.exec(text)
       if m?

        m = /^\/(.*)\/\w*$/.exec(text)
        if m?
          text = m[1]

      foo =
        /abc/

      if not @isVisible or @currentRegex != text
        @.find('div.error-message').remove()

  updateRailRoadDiagram: () =>
    editor = atom.workspace.getActiveEditor()
    return if not editor?

    # python uses raw-regex (must be before other, because python grammar
    # also uses regexp for char classes)
    range = editor.bufferRangeForScopeAtCursor(".raw-regex")

    unless range
      # usually somewhere there is .regexp in scope name
      range = editor.bufferRangeForScopeAtCursor(".regexp")

    #console.log "cursor moved", range
    if not range
      if @isVisible
