• Resolved ernstwg

    (@ernstwg)


    I want to use slug as an extension to specific external websites url, something like https://website1/../slug

    It can happen easily that slug has a suffix like ‘-1’, ‘-2’ and so on. With MLA regular expression methods (extract, replace) I tried to remove this suffix, but was not successful.

    Thank you in advance, Ernst-Wilhelm

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ernstwg

    (@ernstwg)

    It seems that I got it with [+slug,replace('/(\\-\\d)/','')+] ??

    Thanks for all your help, Ernst Wilhelm

    • This reply was modified 2 years, 2 months ago by ernstwg.
    Plugin Author David Lingren

    (@dglingren)

    Thanks for the question and thanks for posting your solution before I could answer it.

    Looks good to me. I discovered some time back that older WordPress versions did not add the dash before the numeral. You might check your older items to see if that affects you.

    I will leave this topic resolved, but please update it if you have any problems or further questions with the replacements.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘string operations’ is closed to new replies.