   (let (last-start-tag
         last-end-tag
         the-tag) ;; end var defs
-    (if (re-search-backward "\\[.+\\]" nil t)
-        (if (looking-at "\\[/")
+    (if (re-search-backward jpw-tag-finder-re nil t)
+        (if (looking-at jpw-tag-end-re)
             (setq last-end-tag (point))
           ;;else
           (setq last-start-tag (point))

  (if pos (goto-char pos))
  (let (next-start-tag
        next-end-tag) ;; end var defs
    (if (re-search-forward "\\[.+\\]" nil t)
        (progn
          (goto-char (match-beginning 0))
          (if (looking-at "\\[/")
              (setq next-end-tag (point))
            ;;else
            (setq next-start-tag (point))

{jpw: 03/2005}"
  (interactive)
  (save-excursion
    (let* ((posn-pair-stack '())
           (current-tag (jpw-phpBB-tag-find-enclosing nil nil t))
           );;end var defs
      (while (car current-tag)
        (setq posn-pair-stack (append posn-pair-stack (list current-tag)))
        (setq current-tag 
              (jpw-phpBB-tag-find-enclosing (1- (caadr current-tag))
                                            (1+ (cadadr current-tag))
                                            t))
        )
      (message "%S" posn-pair-stack)
      );;end let
    );;end excursion
