LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

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

Rep: Reputation: 15
vim or sed multiline regexp matching


Hi,

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
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,377

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


Reply


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 05:21 PM.

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