How to match regex in bash? (any character)

2011-09-26 Thread Peng Yu
Hi, I know that I should use =~ to match regex (bash version 4). However, the man page is not very clear. I don't find how to match (matching any single character). For example, the following regex doesn't match txt. Does anybody know how to match any character (should be '.' in perl) in bash

Re: How to match regex in bash? (any character)

2011-09-26 Thread Steven W. Orr
On 9/26/2011 9:19 PM, Peng Yu wrote: Hi, I know that I should use =~ to match regex (bash version 4). However, the man page is not very clear. I don't find how to match (matching any single character). For example, the following regex doesn't match txt. Does anybody know how to match any ch

Re: How to match regex in bash? (any character)

2011-09-26 Thread Dennis Williamson
On Mon, Sep 26, 2011 at 8:19 PM, Peng Yu wrote: > Hi, > > I know that I should use =~ to match regex (bash version 4). > > However, the man page is not very clear. I don't find how to match > (matching any single character). For example, the following regex > doesn't match txt. Does anybody kn

Re: How to match regex in bash? (any character)

2011-09-26 Thread John Reiser
Peng Yu wrote: > I know that I should use =~ to match regex (bash version 4). > > However, the man page is not very clear. I don't find how to match > (matching any single character). For example, the following regex > doesn't match txt. Does anybody know how to match any character > (should b

Re: How to match regex in bash? (any character)

2011-09-26 Thread Peng Yu
On Mon, Sep 26, 2011 at 9:49 PM, John Reiser wrote: > Peng Yu wrote: >> I know that I should use =~ to match regex (bash version 4). >> >> However, the man page is not very clear. I don't find how to match >> (matching any single character). For example, the following regex >> doesn't match tx

Re: How to match regex in bash? (any character)

2011-09-26 Thread Roger
> On Mon, Sep 26, 2011 at 08:19:27PM -0500, Peng Yu wrote: >Hi, > >I know that I should use =~ to match regex (bash version 4). > >However, the man page is not very clear. I don't find how to match >(matching any single character). For example, the following regex >doesn't match txt. Does anybo

Re: How to match regex in bash? (any character)

2011-09-26 Thread Roger
> On Mon, Sep 26, 2011 at 09:37:07PM -0500, Dennis Williamson wrote: >On Mon, Sep 26, 2011 at 8:19 PM, Peng Yu wrote: >> Hi, >> >> I know that I should use =~ to match regex (bash version 4). >> >> However, the man page is not very clear. I don't find how to match >> (matching any single character