Skip to content

Facebook

Giuseppe Cannella edited this page Feb 19, 2020 · 3 revisions
Type name example
Facebook https://www.facebook.com/pages/
import com.github.gekomad.regexcollection.Facebook                                                                                                                           
import com.github.gekomad.regexcollection.Validate.validate                                                                                                                  
                                                                                                                                                                             
assert(validate[Facebook]("http://www.facebook.com/thesimpsons") == None)                                                                                                    
assert(validate[Facebook]("www.facebook.com/thesimpsons") == None)                                                                                                           
assert(validate[Facebook]("https://facebook.com/pages/Andy-Worthington/196377860390800") == None)                                                                            
assert(validate[Facebook]("www.facebook.com/pages/Andy-Worthington/196377860390800") == None)                                                                                
assert(validate[Facebook]("https://www.facebook.com/pages/Andy-Worthington/196377860390800") == Some("https://www.facebook.com/pages/Andy-Worthington/196377860390800"))     
assert(validate[Facebook]("https://www.facebook.com/pages/") == Some("https://www.facebook.com/pages/"))                                                                     
assert(validate[Facebook]("https://www.facebook.com/thesimpsons") == Some("https://www.facebook.com/thesimpsons"))                                                           
Clone this wiki locally