[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
What is wrong with a regex?
From: |
Peng Yu |
Subject: |
What is wrong with a regex? |
Date: |
Fri, 3 Feb 2023 21:43:44 -0600 |
I don't understand why the following regex can not match row.txt. I
want the regex to match "row", optionally followed by some digits,
then followed by .txt or _x.txt. What's wrong with my regex?
$ f=row.txt; [[ $f =~ ^row([0-9]*)(\|_x)[.]txt$ ]]; echo $?
1
--
Regards,
Peng
- What is wrong with a regex?,
Peng Yu <=
- Re: What is wrong with a regex?, Koichi Murase, 2023/02/03
- Re: What is wrong with a regex?, Dennis Williamson, 2023/02/03
- Re: What is wrong with a regex?, Leonid Isaev, 2023/02/04
- Re: What is wrong with a regex?, Koichi Murase, 2023/02/04
- Re: What is wrong with a regex?, Koichi Murase, 2023/02/04
- Re: What is wrong with a regex?, Jeffrey Walton, 2023/02/04
- Re: What is wrong with a regex?, Koichi Murase, 2023/02/04
- Re: What is wrong with a regex?, Leonid Isaev, 2023/02/04