Regexp search and replace spanning multiple lines
Regexp search and replace spanning multiple lines
- Subject: Regexp search and replace spanning multiple lines
- From: Jean-Denis Muys <email@hidden>
- Date: Tue, 9 Oct 2007 01:32:28 +0200
Hi,
I have some issues regarding search and replace using regular
expressions with XCode.
I can't manage to write a regular expression matching text on two (or
more) consecutive lines. The problem is with the end of line character.
Let's suppose an XCode Window contains the following lines:
AA x
BB y
BB z
I want to transform it into:
AA x
BB y
AA x
BB z
I can match the first line using the following reg exp:
^connect .*\r
But the slightly changed regexp to expand the match to the following
line doesn't work:
^connect .*\rBB
Why? Can I work the problem around?
Incidentally, the XCode documentation points to the ICU page at
http://icu-project.org/userguide/regexp.html
But there are some obvious differences. For example the ICU page
states that $n represents capture group n. That doesn't work in XCode,
which requires \n.
TIA,
Jean-Denis, back to XCode after a long time away.
[Note: If I were using XCode 3, is there any mailing lists open only
to people under NDA, so that I could discuss it more specifically?]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden