Hi!

----

While writing a new application I hit a problem with the builtin
egrep/grep/fgrep-pattern matching:
-- snip --
$ (x="foo12bar" ; [[ "$x" = ~(E)12 ]] && print "match" || print "no
match")
match
$ (x="foo12bar" ; [[ "$x" = ~(G)12 ]] && print "match" || print "no
match")
match
$ (x="foo12bar" ; [[ "$x" = ~(F)12 ]] && print "match" || print "no
match")
no match
-- snip --

Why does ~(F)12 not match "foo12bar" ? Does ~(F) have implicit
left/right anchors, is it a bug or am I simply wrong and  ~(F) doesn't
work like "fgrep" ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to