Q:

Regex - Select content by `contains` condition?

Looking at this string : 
[app/default-viewcomponent.ts]

I need to select the whole string only if it contains . (at least one)
This is what I've managed to do and it works (partially): 
(\[(.(?=.*\.[^\]]+)).*\])

()  - becuase I need to  extract the group content
(.(?=.*\.[^\]]+)) positive lookahead - get all chars which has a future dot
.*\] - after the dot there can be more content which is closed with ].

Looking at this image , there is a match : 

But if I move the dot to last char before ] , there's no match : 

Question: 
I think I know what the problem is , it's becuase the regex don't match a situation where the dot is right before the ].
How can I fix my regex , Also - is there's a better/simpler way of doing it ?
REGEX101

A:

You can solve the problem with no lookarounds, use 2 negated character classes:
\[[^\].]*\.[^\]]*\]

See the regex demo
Note that this way you only match [...] if the dot is inside the brackets. Your original regex matches [...] if a dot is after the closing bracket, too, due to the . pattern used in the lookahead and . matches any char but a line break char.
Details

\[ - a literal [
[^\].]* - zero or more chars other than ] and .
\. - a dot
[^\]]* -  zero or more chars other than ]
\] - a literal ] (need no escaping, but just escaped for consistency).

A:

It is the + in there causing the problem, because burried in your regex is the condition

Any character that is NOT in this class: []], one or more repetitions

Changing that + to a * (any number of repetitions) fixes the problem.
New regex: (\[(.(?=.*\.[^\]]*)).*\])
Tested against 
[app/default-viewcomponentts.]  
[app/default-viewcomponent.ts]  
[app/default-viewcomponent.ts.]

