Thanks Sam.  That grep pattern is fantastic!  

We can have a small worksheet with the grep pattern. We’ll search for N-1, then 
in the worksheet select <Session> and cmd+E, toggle to the data file window and 
cmd+G to find the next one.   😎

If this becomes a needed routine we’ll create something with XPath.  

Thanks! 

dEVoN 



> On Mar 14, 2022, at 11:48, Sam Birch <[email protected]> wrote:
> 
> Devon,
> XPath is probably the right move here, to be honest.
> 
> That said, BBEdit can select everything up to (and including) the 200th 
> occurrence of <Session> with this regular expression:
> 
> (?s)(.*?<Session>){200}
> Hope this helps.
> -sam
> 
> On 14 Mar 2022, at 13:51, Devon Hubbard wrote:
> 
> We have the need to search through a ton of transactional data for things 
> like the 200th occurrence of <Session> to dig into that specific node. One 
> of our team members is thinking of writing an XPath thing, but then we 
> thought there might be a way to do with this in BBEdit. Not through any 
> grep magic I've been able to get working so far. Maybe a cool extension 
> out there that does this?
> 
> thanks
> 
> -- 


-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/E694FB0B-7464-4970-AA43-5FBB0E675DDB%40gmail.com.

Reply via email to