This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cygwin bash regexp matching doesn't treat "\b" properly
What I have often done in a case like this is:
Add the separator (space in this case) at each end of the list.
So, if the initial string is "101 203 455" I turn that into
" 101 203 455 ".
LIST=" ${LIST} "
Then I match the desired string, also surrounded by spaces,
like this:
[ -z "${LIST##* ${DESIRED} *}" ] && { ... }
This uses simple bash globbing stuff that seems to work
everywhere. It's an idiom I've become accustomed to :-) ...
Regards -- Eliot Moss
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple