phpBB to EE - Intra-forum links transformation


/ Published in: Regular Expression
Save to your folder(s)

Tested in TextWrangler 2.1.3 on 17 Nov. 2006, and works beautifully :O


Copy this code and paste it in your HTML
  1. (?#
  2. phpBB to ExpressionEngine Conversion
  3. ------------------------------------
  4. Intra-forum links replacement regex
  5.  
  6. ORIGINAL:
  7. ---------
  8. http://www.holybork.com/viewtopic.php?p=1129&amphighlight=#1129
  9.  
  10. TRANSFORMED:
  11. ------------
  12. http://www.holybork.com/forums/viewthread/1129/
  13. )
  14.  
  15. (?# MATCH )
  16. (.*)viewtopic\.php\?p=(\d+)(.*)
  17.  
  18. (?# REPLACE )
  19. \1forums/viewthread/\2/
  20.  
  21. (?# 17 Nov. 2006 - Raws )

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.