Visit the LQ Articles and Editorials section
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


Search this Thread
Old 09-08-2008, 08:25 AM   #1
LQ Newbie
Registered: Jan 2008
Posts: 26

Rep: Reputation: 15
vim or sed multiline regexp matching


I have a text where I need to match a pattern which spans multiple line. How can I make the vim substitute command search patterns over multiple lines? Or Sed.
Old 09-08-2008, 09:06 AM   #2
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,231

Rep: Reputation: 1071Reputation: 1071Reputation: 1071Reputation: 1071Reputation: 1071Reputation: 1071Reputation: 1071Reputation: 1071
Regular expressions have an option ("m", I think) which stipulates that the source-text should be parsed without respect for newlines.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript regexp - strange exec behaviour, or space matching? jkobrien Programming 3 08-20-2008 07:09 AM
LXer: Variable MultiLine Spacing With Sed On Linux Or Unix LXer Syndicated Linux News 0 07-07-2008 12:30 AM
sed and multiline delete aliyesami Programming 3 06-27-2008 02:03 PM
help with sed / regexp elinenbe Programming 2 02-01-2008 10:09 AM
substituting multiline string in sed rohit2983 Programming 3 01-31-2007 09:00 AM

All times are GMT -5. The time now is 10:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration