I am trying to write a regular expression that will match values such as U.S., D.C., U.S.A., etc.
U.S.
D.C.
U.S.A.
Here is what I have so far -
Try (?:[a-zA-Z]\.){2,}
(?:[a-zA-Z]\.){2,}
?: (non-capturing group) is there because you want to omit capturing the last iteration of the repeated group.
?:
For example, without ?:, 'U.S.A.' will yield a group match 'A.', which you are not interested about.