h8rt3rmin8r

Airtable URL cleaner function

Jan 27th, 2019
205
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. IF(FIND("/", IF(LEFT(IF(LEFT(url, 4)="http", IF(LEFT(url, 5)="https", SUBSTITUTE(url, "https://", "", 1), SUBSTITUTE(url, "http://", "", 1)), ""), 4)="www.", SUBSTITUTE(IF(LEFT(url, 4)="http", IF(LEFT(url, 5)="https", SUBSTITUTE(url, "https://", "", 1), SUBSTITUTE(url, "http://", "", 1)), ""),"www.", ""),IF(LEFT(url, 4)="http", IF(LEFT(url, 5)="https", SUBSTITUTE(url, "https://", "", 1), SUBSTITUTE(url, "http://", "", 1)), "")))=0, IF(LEFT(IF(LEFT(url, 4)="http", IF(LEFT(url, 5)="https", SUBSTITUTE(url, "https://", "", 1), SUBSTITUTE(url, "http://", "", 1)), ""), 4)="www.", SUBSTITUTE(IF(LEFT(url, 4)="http", IF(LEFT(url, 5)="https", SUBSTITUTE(url, "https://", "", 1), SUBSTITUTE(url, "http://", "", 1)), ""),"www.", ""),IF(LEFT(url, 4)="http", IF(LEFT(url, 5)="https", SUBSTITUTE(url, "https://", "", 1), SUBSTITUTE(url, "http://", "", 1)), "")), LEFT(IF(LEFT(IF(LEFT(url, 4)="http", IF(LEFT(url, 5)="https", SUBSTITUTE(url, "https://", "", 1), SUBSTITUTE(url, "http://", "", 1)), ""), 4)="www.", SUBSTITUTE(IF(LEFT(url, 4)="http", IF(LEFT(url, 5)="https", SUBSTITUTE(url, "https://", "", 1), SUBSTITUTE(url, "http://", "", 1)), ""),"www.", ""),IF(LEFT(url, 4)="http", IF(LEFT(url, 5)="https", SUBSTITUTE(url, "https://", "", 1), SUBSTITUTE(url, "http://", "", 1)), "")), FIND("/", IF(LEFT(IF(LEFT(url, 4)="http", IF(LEFT(url, 5)="https", SUBSTITUTE(url, "https://", "", 1), SUBSTITUTE(url, "http://", "", 1)), ""), 4)="www.", SUBSTITUTE(IF(LEFT(url, 4)="http", IF(LEFT(url, 5)="https", SUBSTITUTE(url, "https://", "", 1), SUBSTITUTE(url, "http://", "", 1)), ""),"www.", ""),IF(LEFT(url, 4)="http", IF(LEFT(url, 5)="https", SUBSTITUTE(url, "https://", "", 1), SUBSTITUTE(url, "http://", "", 1)), "")))-1))
RAW Paste Data