Support » Plugin: WPeMatico RSS Feed Fetcher » Which regex syntax?

  • Resolved wikibit

    (@wikibit)


    Hi,

    I’m a bit lost as to which exact regex syntax to use.

    For example, I would like feed/posts containing 2FA or MFA or IDENTITY to be assigned to a category authentication
    Test text :
    “This is a topic or text on MFA or 2FA in relation to authentication and identity management.”

    I tried the following regex but they don’t do anything
    /(?:2fa)|(?:MFA)|(?:identity)/ig
    /2fa|MFA|identity/ig
    /(2fa)|(MFA)|(identity)/ig

    but each of them work in the regex tester:
    https://regex101.com/r/oejBrg/3
    https://regex101.com/r/oejBrg/4
    https://regex101.com/r/oejBrg/5/

    Also tried the stripped down version :
    2fa|MFA|identity

    Anyone other ideas?

    Thanks

Viewing 1 replies (of 1 total)
  • Hello,
    I was studying your case, however we are not experts in RegEx, but you could try this way: /(?:2fa)|(?:MFA)|(?:identity)/i (without the letter “g” at the end, since WPeMatico processes regular expressions in php, and that letter at the end is part of the regular expressions in javascript).
    Regards,
    Carlos

Viewing 1 replies (of 1 total)
  • The topic ‘Which regex syntax?’ is closed to new replies.