Here's a little Applescript snippet that works in BBEdit:

find "src=\"([a-zA-Z0-9\\=\"\\.\\-_]+)/([a-zA-Z0-9\\=\"\\.\\-_]+)\"" searching 
in imgDocRef options {search mode:grep, starting at top:false} with selecting 
match
        
        set imgSrc to grep substitution of "\\1"
        set imgName to grep substitution of "\\2"

Don't know if it works in anything else.

On May 11, 2014, at 3:36 PM, Lee Hinde wrote:

> I am parsing apache log files. This is the grep pattern I'm using:
> 
> GET /public/search/\?q=(\w|\+|\.|-)+
> 
> works fine. But I want to extract just the text that matches that string and 
> lose all the rest of the line.
> 
> How would I do that?
> 
> -- 
> 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].

-- 
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