I'm learning about regular expression, and they are divided into basic and extended.Basic Regular Expression(BRE) uses meta-character [ ] ^ $ . *.It's works on grep command well. But, when we use ls, echo or something else command, it works well, too.(For example, ls -al [abc]*.txt)But, when I learn section about pathname expansion, it uses BRE's metacharcter.So, I think they are same. Am I right?
Is Basic Regular Expression same as pathname expansion in shell?
linux;command
Pathname expansion doesn't hold any special meaning for ^, $, or ..* in a BRE matches zero or more repetitions of the preceding character or group (so a* , a, aa, aaa, ). * in pathname expansion matches any string, independent of the previous character (so a* a, ab, a !!! and any ?? string whatsoever,  - note: it doesn't match the empty string, which the a* BRE does). Similarly for ?.Negation in [] is via a leading ^ in BRE and a leading ! in pathname expansion.. matches any character in BRE, whereas . has no special significance in a pathname pattern. It does have significance in what is matched, but not in the pattern itself.Beyond some superficial similarities, they are very different. Some things are possible in BREs and impossible in pathname matching (for example, try matching a filename composed only of as).