Thread: Regular Expressions wildcard question
hi there. i'm trying become familiar commandline (self-studying book) , ran confused me. if understand correctly, asterisk (*) functions repetition indicator , period (.) functions wild card character in regular expressions. so, example, a.*b "a" in beginning , "b" @ end.
despite this, in various locations seeing * representing number of characters itself, without period preceeding (as in *.conf). how tell if program (or other situation) uses regular expressions (necessitating period before star) or plain asterisks wildcards?
clarification.
let me first stand corrected on this. understanding only......
bash , regex handle * differently.
regex interprets * none or more occurrences of proceeding character so, in regex .* means string of length comprised of characters. * needs proceeding character act upon.
bash, interprets * .* (in regex), because . has different meaning in bash - current working directory.
informed wether or not right this.
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] Regular Expressions wildcard question
Ubuntu
Comments
Post a Comment