The regular expression .+?(?=\.{4,}) matches asdf in asdf....... , because it finds 4 or more points immediately after the value, but since \.{4,} is inside the template , not consuming, ....... remains to check the first . in this substring is the same again, since .+? matches any 1 or more characters other than line breaks, but as small as possible. The same thing happens with the second and third . as they are followed by 4 + commas.
What you can do is to either make part of the correspondence to the consuming points and capture .+? (then the value you need will be in group 1):
(.+?)\.{4,}
Watch the regex demo
Here (.*?) Is the capture group corresponding to 0+ characters (use * instead of + to match 1 or more), except for line break characters, and \.{4,} will match and consume 4 or more . (not allowing you to check compliance when inside dots).
source share