Python:
array = ['https://www.facebook.com/profile.php?id=100003312311771', 'https://www.facebook.com/profile.php?id=100036605837335']
for x in array:
res = x.split('php?id=')[1]
print(res)
with open('some.txt', 'a') as save:
save.write(res + '\n')