Is there any way to analyze the format of text strings?
A machine learning approach to this would be create character-level encoding for the data. Then, you can run K Means (use silhouette score for judging the fit) or Louvain community detection (doesn't need the number of clusters as input). You can finally look at cluster heads for the formats.