Web Analytics Made Easy -
StatCounter Help with preg_replace - CodingForum

Announcement

Collapse
No announcement yet.

Help with preg_replace

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with preg_replace

    I desperately need some help with preg_replace, badly. I am trying to convert a phpbb3 forum to vbulletin and the conversion throws :######## at the end of every tag (# is alphanumeric). Getting help at vb.com is like having a root canal without Novocain :P.

    Anyway, here are the replacements:
    Code:
    [anchorlink={#}:hc09ugrb]#[/anchorlink:hc09ugrb] or [anchorlink={A}:hc09ugrb]A[/anchorlink:hc09ugrb]
    Notice the middle is simple either # or a letter.
    Also,
    Code:
    [anchor:3hp01kqb]{#}[/anchor:3hp01kqb] or[anchor:3hp01kqb]{A}[/anchor:3hp01kqb]
    Again, the middle is either # or a letter with {} surrounding it.
    [code][align=position:3hp01kqb]text[/align3hp01kqb][code]
    where position is either left, right, or center.....in this case I would prefer to convert the corresponding bbcode to:
    Code:
    [left] or [right] or [center]
    resoectively.
    and this one should be easy, but I cannot even get it to work
    Code:
    [s:1rje3dky]strikethrough[/s:1rje3dky]
    with each of these the most important thing for me is to get rid of the : and all the crap that was added after it.

    I am sorry for making my first post be one like this, but I have next to zero experience with this kinda stuff and really need help.

    Thanks a lot.
    Last edited by WascallyWabbit; Apr 6, 2009, 01:53 PM.

  • #2
    I hope someone can help me with this. I would even be happy with links to stuff so I can at least start, cause I have no clue what I am doing.

    Comment

    Working...
    X