regex - How to get page title from URL in Google Sheets? -
if cell a1 contains url text:
http://my.url.com/some/path/my-page.html
how can write formula in a2 extracts page title:
my-page
you may try =regexextract
regex featuring following regex:
"^.*/(.*)\.[^.]+$"
it matches:
^
- start of string.*/
- matches string last/
(.*)
- matches and captures 0+ chars last.
\.
- dot[^.]+
- 1 or more chars other dot$
- asserts position @ end of string.
note once capturing group defined in pattern, regexextract
returns submatch captured.
Comments
Post a Comment