none
Way to remove text after the last occurrence of a character? RRS feed

  • Question

  • Essentially I have a column of websites and I'm trying to remove everything past the last forward slash.

    So basically is there a good way in PowerQuery to go from:

    http://www.test.com/gallery/1/image.jpg
    to
    http://www.test.com/gallery/1/

    ?

    Thank you for any and all help.

    Sincerely,

    Robert


    • Edited by ndubitably Monday, June 25, 2018 7:48 PM
    Monday, June 25, 2018 6:08 PM

Answers

  • In the Extract menu options pick "Text Before Delimiter"

    Then open the advanced options in the menu and change the "Scan for delimiter" option to "From the end of the input"

    Monday, June 25, 2018 9:53 PM