I am trying to parse a domain that has more than two period's in the string.
So for example, I am trying to get sjmktmail-batch1a.marketo.org into marketo.org
I tried using split and a range from the list like this:
testdata = sjmktmail-batch1a.marketo.org
testdata.split(".")[1:2]
but that didn't work.
doing testdata.split(".")[1] brings up marketo but I want marketo.org
Sorry, my main language is python, so some javascript concepts confuse me. I assume you can't get a range of an array/list by using [x:x]
My main goal is to get a domain like domain.com
so for example:
fdasdadio.conglomo.com would be conglomo.com
billy.fdaoco.codsaso.mainbug.com would be mainbug.com
purple.red.bri.noschool.edu would be noschool.edu
Pretty sure I am missing a concept that would make this easy.
sjmktmail-batch1a.marketo.org&sjmktmail-batch1a.marketo.org