help-bash
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]