Q:

Using grep with delimiter and wildcard to search information from file

I have the following information on text file.
abcde:fghi:aaaa
abdef:fgih:aaaa
fbcff:gggg:aaaa

Using ':' as a delimiter,I need to use grep to match searches for e.g fg*
output will be
abcde:fghi:aaaa
abdef:fgih:aaaa

In summary, I need to match searches using grep with wildcards inbetween the search term and delimter.

A:

Try this pattern:
grep ':.*fg.*:' ./*

