From owner-freebsd-questions@freebsd.org Sun Jun 26 13:11:06 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACC8FB7320A for ; Sun, 26 Jun 2016 13:11:06 +0000 (UTC) (envelope-from me@danieldk.eu) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8508F2FC8 for ; Sun, 26 Jun 2016 13:11:06 +0000 (UTC) (envelope-from me@danieldk.eu) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E26C6209D0; Sun, 26 Jun 2016 09:10:58 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Sun, 26 Jun 2016 09:10:58 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=danieldk.eu; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=kgD X1uhECWbxPotnECnsAMV57Bw=; b=MCYHLtT3/YTHmtFRBgG5xa4aJtPwAfBGoxM P3oEY58dZ3itxPIcZeLM1AccpEJZMQdiBXpcg7fpqNnqmi2IQauZLpF34P2lJgjN vUQCCOab/+BYWGy5DwyDDtuINz9a009RN2NO78Phtyi31sATSt6529ftKi7u32SQ GCjwgpLs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=kgDX1uhECWbxPotnECnsAMV57Bw=; b=ZzLWT EFR3+fzh4wFYVYfJqzXXW4dsczUwqDP6FcyKFeTuIUp6MNDKJ36PRl7yptiGds9U ajF+b9bUJNpzFcbCMWJkGxyqdkz7rrHnHKkvyVB5Pv5LjLRC4R99AVgAQAscZlOR PqvNU0J6O698dbvTH7gbypLCNGQKtU+Mctxhkg= X-Sasl-enc: vH1nXufrTubyfdClXWCeso0Djx/12mMBZ8wofN+dsVAk 1466946658 Received: from daniels-mini.fritz.box (hsi-kbw-046-005-018-048.hsi8.kabel-badenwuerttemberg.de [46.5.18.48]) by mail.messagingengine.com (Postfix) with ESMTPA id 6E58BF29FA for ; Sun, 26 Jun 2016 09:10:58 -0400 (EDT) From: =?utf-8?Q?Dani=C3=ABl_de_Kok?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: grep and anchoring Message-Id: <20232C89-B821-41EC-9188-C2A19C679BD8@danieldk.eu> Date: Sun, 26 Jun 2016 15:10:57 +0200 To: freebsd-questions@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jun 2016 13:11:06 -0000 Dear all, After a BSD hiatus of many years, I am tinkering with FreeBSD again. = I=E2=80=99ve run into some strange issue with grep and beginning of line = (^) anchoring: =E2=80=94 % echo "1234 1234 1234" | egrep -o '^=E2=80=A6.' 1234 123 4 12 % echo "123412341234" | egrep -o '^....' 1234 1234 1234 =E2=80=94 Any idea what is going on here? (Recent GNU grep from ports gives the expected output.) With kind regards, Dani=C3=ABl de Kok Ps., grep on OS X, which seems to be the same version has similar = problems=E2=80=A6=