On Fri, Sep 27, 2013 at 01:48:45PM -0600, LuKreme wrote:
> searching: ^[^/]+\/
> 
> this matches across lines
> 
> file1
> file2
> file3
> path/to/file
> 
> since when does + match across line breaks?
> 
> Or am I misremembering?

[^/] means: match any character other than a forward slash.
+ means: match one or more of the previous sub-expression.

The newline character is not a forward slash, so it is matched by [^/], so
your pattern matches across lines.

If you don't want to match newline characters, then you want [^/\n]+
instead.  (Or it might be [^/\r]+ - I can't remember at the moment whether
BBEdit uses \r or \n for the newline character.)


Ronald

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to