fun with regex

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • treszoks
    Member
    • Jul 2000
    • 33

    fun with regex

    I want to convert all the newlines in a variable passed in a form using nl2br EXCEPT for the stuff enclosed within something sort of like the vbcode's code tag function. Can anyone help? Thanks.
  • Mike Sullivan
    Former vBulletin Developer
    • Apr 2000
    • 13327
    • 3.6.x

    #2
    Heh, you're not the only one hoping for a simple way to do that.
    Look at the bottom of the bbcodeparse2 function - the code to replace <br>'s with \n is basically what you need to adapt.

    Comment

    • Michael
      Member
      • Apr 2000
      • 65

      #3
      n/m - didn't read the question properly. sorry

      [Edited by Michael on 11-15-2000 at 06:41 AM]
      Michael Bray

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...