我有數千個 URL 需要重寫。因此,我嘗試從 URL 中洗掉.html擴展名date(yyyy/mm/dd)。我可以洗掉擴展名。但我無法從字串中洗掉日期。
有人可以幫我嗎?
我想以這種方式2020/11/05/或這種方式洗掉日期/2020/11/05
它的外觀: https://www.example.com/2020/11/05/my-post-slug-for-this-post-2022.htm
預期輸出: https://www.example.com/my-post-slug-for-this-post-2022
提前致謝
uj5u.com熱心網友回復:
你可以試試:

中的公式B1:
=REGEXREPLACE(A1,"(?:\/?\b\d{4}\/\d\d\/\d\d\b|\.html$)","")
我否定了 的格式,2020/11/05/因為我不確定您是否會在使用上述建議時遇到任何問題。
uj5u.com熱心網友回復:
嘗試:
=INDEX(REGEXREPLACE(A1:A,"(?:\/\d{4}\/\d{2}\/\d{2}|\.html?$)", ))

轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/404763.html
標籤:
