Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!wuarchive!emory!wa4mei!holos0!lbr From: lbr@holos0.uucp (Len Reed) Newsgroups: comp.lang.perl Subject: What's a Word Boundary? Message-ID: <1991Feb26.183337.24976@holos0.uucp> Date: 26 Feb 91 18:33:37 GMT Sender: lbr@holos0.uucp (Len Reed) Distribution: usa Organization: Holos Software, Inc., Atlanta, GA Lines: 14 The manual speaks of, but does not define, a "word boundary" in regular expressions. I presume that a word is \w+ and that a word boundary will match at ^ and $ and at the edges of, but not within, \w+ . I'm trying to match 6 digit strings, but I don't want to match a six digit string that is part of a larger alphanumeric string. The following seems to work. Is it in fact what I want? /\b\d{6}\b/ -- Len Reed Holos Software, Inc. Voice: (404) 496-1358 UUCP: ...!gatech!holos0!lbr