pattern matching across two lines 
Author Message
 pattern matching across two lines

If you have the sam text editor and you want to make
ALL "foo bar" into "foobar" whether there is a space
or a newline between the two words, you'd just do the
real real obvious, match the foo*bar and delete either
the space or the newline:

    /foo( |\n)bar/ . . . etc, where \n could be ^M

Duh . . .

Quote:

>I have text as follows:

>foo^M
>bar

>in several files. I need to replace this with:

>foobar

>How can I match patterns across two lines?

>Thanks,

>Sent via Deja.com http://www.*-*-*.com/
>Before you buy.



Mon, 21 Apr 2003 11:26:24 GMT  
 pattern matching across two lines
from what i gather some of the build releases of Mission Possible could do
that very easily...

http://www.lanasoft.com/mp

Quote:

>>I have text as follows:

>>foo^M
>>bar

>>in several files. I need to replace this with:

>>foobar

>>How can I match patterns across two lines?

>>Thanks,

>>Sent via Deja.com http://www.deja.com/
>>Before you buy.



Fri, 25 Apr 2003 12:13:35 GMT  
 pattern matching across two lines

Quote:
>>>How can I match patterns across two lines?

Brest, le lundi 6 novembre

use Sam ;-)
    ^^^
--
   .~.   Thomas Baruchel

  // \\    Brest
 /(   )\   FRANCE
  ^`~'^



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. pattern matching across two lines

2. Pattern matching across multiple lines in a file

3. pattern matching across lines

4. Pattern matching spanning more than one line and substitution between two files -

5. combine two pattern matches to one match?

6. help - grep lines between two line patterns

7. Problem with search and replace across two lines

8. Searching all instances of a pattern across multi-lines

9. Pattern bug matching whitespace in multi-line match?

10. Regex problem: Multiple matches across Multiple lines

11. matching hyphenated words across line ends

12. Greedy matching across multiples lines.

 

 
Powered by phpBB® Forum Software