Search Results

Search found 1 results on 1 pages for 'user998163'.

Page 1/1 | 1 

  • Regex in MySql - replace between Tags including Tags

    - by user998163
    I have a text like: [lang_de]Content in German[/lang_de][lang_en]Content in English[/lang_en]. I want to replace all text between [lang_en] and [/lang_en] including the opening and closing language tag. This is my current regex: UPDATE wp_posts SET post_content = '" . addslashes(preg_replace("/[lang_en](.*)[\/lang_en]/", '', $row['post_content'])) . "' WHERE ID = " . $row['ID'] With this regex, I do not get a valid results. It also replaces in html tags and so on. What would be the correct regex?

    Read the article

1