Re: still not grokking grep
Just want to applaud Bill for this explanation. It may well help Michael in his journey to grok grep. Bill Teach steps and they will have only one way to go. Teach concepts and they can lead others. On Oct 27, 2009, at 9:34 AM, Bill Hernandez wrote: Let me go over what all the giberish means by breaking down : smime.p7s Description: S/MIME cryptographic signature
grep help, delete everything other than what I'm matching
I'm using BB Edit grep to select links like this: (\) So I can paste the match using: \1 However, I basically want to delete everything else in the document except these links, so that all I am left with is the links. Possible to modify my code to accomplish this? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. -~--~~~~--~~--~--~---
Re: grep help, delete everything other than what I'm matching
At 09:30 -0700 10/28/09, BB Design wrote: >I'm using BB Edit grep to select links like this: > >(\) > >So I can paste the match using: \1 > >However, I basically want to delete everything else in the document >except these links, so that all I am left with is the links. Possible >to modify my code to accomplish this? Thanks! First: you better make sure that regular expression isn't greedy. It's likely to select everything from the first in the line or possibly to the end of the file. (\) and next you'll need to allow for links that pass through lineend characters unless you know a lot about the structure of the html file. In my favorite language it would be an s after the trailing quote of the overall expression, //is. In BBEdit it's (\s) or something like that at the end of the expression. -- --> So do we celebrate the start of a new decade at the end of this year? Or do the tens start at in January 2011? Was the first year, ACE, assigned Roman numeral I ?<-- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. -~--~~~~--~~--~--~---
Re: grep help, delete everything other than what I'm matching
On Thu, Oct 29, 2009 at 05:30, BB Design wrote: > I'm using BB Edit grep to select links like this: > > (\) > > So I can paste the match using: \1 > > However, I basically want to delete everything else in the document > except these links, so that all I am left with is the links. Possible > to modify my code to accomplish this? Thanks! > I'd use an Applescript to do this: remove all Return characters -- gets everything on one line replace with /a>\r -- puts a Return after a link Process lines containing " using "/a>\\r" options {search mode:grep, starting at top:true, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false} -- put out lines with links process lines containing matching string "http://knowit.co.nz/bookstore Dogs. Fun. Outdoors. : http://runspotrun.info iPod, iPhone, Mac Tips: http://mactips.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. -~--~~~~--~~--~--~---
Re: grep help, delete everything other than what I'm matching
Thanks so much! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. -~--~~~~--~~--~--~---
Re: still not grokking grep
On Oct 28, 2009, at 7:43 AM, William Reveal wrote: > Just want to applaud Bill for this explanation. It may well help > Michael in his journey to grok grep. > > Bill Yes, I meant to chime in and thank him for the tutorial and I will refer to it before I whine for help again. But I did receive a direct reply from Kerri the night I posted and his suggestion/code > > If your data set is really as simple as this, and there are no other > pointy brackets in your data, just turn grep on and in the search box, > do > > <(.*?)> > > and replace with nothing. > > (This assumes that there are no line breaks within the HTML code...) worked perfectly. Some of the other suggested more elaborate code did not. So I am very thankful for the help offered by all. But I must say I really do think that this is a major hole in the BBEdit feature set. I have upgraded over the years primarily on principle (because I use BBEdit a lot) but other than the Textfactories I do not see very many added functions that I am making use of from about the 8.0 version onwards (I use maybe 7-10 of the menu commands). A Grep builder should be a feature in the next release since that is probably the function/capability that is most requested on this list. That would be a new very useful capability and (if I was BB sales manager) allow for pitching the product to people who are not coders but (like me) just need to shovel a lot of text around on an ongoing basis. Anyway, thanks for all the help. And if you ever get offered a data export from a company in Germany allow 2-3 times the effort to clean out the chaff ;-). M./ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. -~--~~~~--~~--~--~---
Re: grep help, delete everything other than what I'm matching
On Oct 28, 2009, at 10:33, BB Design wrote: > However, I basically want to delete everything else in the document > except these links, so that all I am left with is the links. Text menu, process lines containing. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. -~--~~~~--~~--~--~---