On Tue, Jun 08, 2010 at 02:23:48PM +0200, Farkas Levente wrote: > ----------------------------- > if [[ "abc" =~ "abc.*" ]]; then echo inside; else echo outside; fi > ----------------------------- > this give "inside" up to 4.0, but it gives "outside" in 4.1.
If you want the .* to be taken as a regular expression, rather than a literal period and asterisk, you must remove the quotes from around it. if [[ abc =~ abc.* ]]; then echo match; else echo no match; fi