Article View: comp.editors
Article #2743Multiple line regexps
From: kam hung soh
Date: Sun, 02 Jun 1991 23:13
Date: Sun, 02 Jun 1991 23:13
12 lines
1079 bytes
1079 bytes
I would like to write a regular expression which can look for patterns longer than one line. For example, I want to find the first line of each paragraph. If I try this regexp in grep or awk, /^$^.+$/, nothing happens. Admittedly, I could replace newlines with a unique character say '~', before I process my file, but I wondered if regexps can be used across a newline boundary. Regards, Soh, Kam Hung email: h.soh@trl.oz.au tel: +61 3 541 6403 Telecom Research Laboratories, POB 249 Clayton, Victoria 3168, Australia
Technical Details
Message-ID:
<1991Jun2.231351.10229@trl.oz.au>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!munnari.oz.au!bruce!trlluna!titan!andromeda!sohShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!munnari.oz.au!bruce!trlluna!titan!andromeda!soh From: soh@andromeda.trl.OZ.AU (kam hung soh) Newsgroups: comp.editors Subject: Multiple line regexps Summary: Is it possible? Keywords: regexp, multiple lines Message-ID: <1991Jun2.231351.10229@trl.oz.au> Date: 2 Jun 91 23:13:51 GMT Sender: news@trl.oz.au (USENET News System) Distribution: comp Organization: Telecom Research Labs, Melbourne, Australia Lines: 12