Error:missing quotes (again)

Error:missing quotes (again)

Here are the 3 possible examples:

https://www.facebook.com/pages/abcdefg-abcdef/184320056128

http://www.facebook.com/abcdefghijklmnopq

https://www.facebook.com/abcdefghijklmnopqrstuvwxyz/timeline


I am trying to parve out the name after .com/ or between .com/ and /time or pages/ between /.


Because custom fields can't be used in a calculation I attempted to do the following:


If(

Find(${Leads.Facebook},’pages’,1)

=0,

If(

Find(${Leads.Facebook},’/',27)

=0,

Substring(${Leads.Facebook},

Find(${Leads.Facebook},’/',23)

+1,

Len(${Leads.Facebook})

-Find(${Leads.Facebook},’/',23)),

Substring(${Leads.Facebook},

Find(${Leads.Facebook},’/',23)

+1,

Find(${Leads.Facebook},’/',27)

-Find(${Leads.Facebook},’/',23)

-1)),

Substring(${Leads.Facebook},

Find(${Leads.Facebook},’pages',1)

+6,

Find(${Leads.Facebook},’/',

Find(${Leads.Facebook},’pages',1)

+6))

-Find(${Leads.Facebook},’pages’,1)+6)


The calculation or it's equal works in Excel.  However I get the Error:missing quotes pop up.


Any suggestions?