• michaeljournolleau

    (@michaeljournolleau)


    Hello,

    I have problem with a simple RegEx that cause a white page on my site.

    I want to replace all my <h1>JFV-0001</h1>, <h1>JFV-0002</h1>, <h1>JFV-XXXX</h1>… by <h1>Boutique</h1>.
    My configuration is :
    Replace : /JFV-.\[0-9]/
    By : Boutique
    Use RexEx : Active

    What is the problem ?
    Thanks in advance for your help.
    Michael

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Marios Alexandrou

    (@marios-alexandrou)

    If you’re getting a white screen it typically means the regex is matching more than expected and causing the page to not load. In your case I think it’s the period in the middle is matching everything and not just a few numbers.

    Thread Starter michaeljournolleau

    (@michaeljournolleau)

    I think you right because the text JFV-XXXX (where XXXX are numbers) are everywhere in my page.
    What about my regex?
    How to include the <h1> and </h1> in the regex to limit the replacement to the titles?

    Plugin Author Marios Alexandrou

    (@marios-alexandrou)

    I typically advise people to start small and match just a portion of what they want to match and then add to the rule slowly until it works as desired. Regex is tricky and often it’s just trial and error until you get it to work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Regex problem – White page’ is closed to new replies.