Re: Regular Expression in Xcode Editor: newlines+whitespace
Re: Regular Expression in Xcode Editor: newlines+whitespace
- Subject: Re: Regular Expression in Xcode Editor: newlines+whitespace
- From: Jerry Krinock <email@hidden>
- Date: Mon, 3 Nov 2008 04:59:43 -0800
On 2008 Nov, 02, at 20:38, Chris Espinosa wrote:
Xcode doesn't do cross-line regex matches.
OH MY GOSH! Thank you, Chris. Now, after years of thinking I was too
damned stupid to understand ICU Regular Expressions, finally I know
why I always resort to BBEdit for serious regex jobs. (Well, I must
admit that my feeble brain also relies on the regex syntax coloring
provided by BBEdit in its Find window.)
(Neither does grep, for that matter.)
Yes, but everybody knows that's a geek tool. Besides BBEdit, Textual
searching in Xcode has no problem crossing line endings. The "ICU
User Guide" on the internet does not state this limitation either.
Thanks again for enlightening me.
I have submitted two "wasn't helpful" documentation bugs: One on the
Find window and one on the Project Find window, for not stating the 1-
line limitation of Xcode Regex matching.
If you are looking for a pattern at the beginning of the line, use
the regex "beginning of line" marker, "^". And of course you want
to find runs of whitespace, not just the first instance, so the
regex you want is
^\s+
Also thanks to Matthew for this.
Jerry
_______________________________________________
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