Can anyone help me with a problem I am encountering? Pretty familiar with Google Spreadsheet but not regex.
I have a function
=REGEXEXTRACT(A1, ".*\/(\w+)\/(\w+)\/")
so for arguments sake, A1 =
google.com/structure1/structure2/structure3/page.php
The it spits out into B1 'Structure2' and C1 'Structure3'.
Now ideally what I want is 'Structure3' in B1 and 'Structure2' in C1.
I know I can just make D1 = B1 but I want to figure it out.
The regex was generated from google and SO searches which I do not fully understand.
What I am trying to achieve is inputting a series or URLs in Column A and then getting it hierarchy basically.
The above regex does not work if I have
google.com/page.php
Any help appreciated.
Edit: I'm guessing a script would have to be make for the last problem but am struggling figuring out how to tackle it?