BBEdit user Beginner grep question. Optional minus find and replace
May 20, 2010; 13:00
BBEdit user
Beginner grep question. Optional minus find and replace
I'm very much an amateur with grep.
How do I find the optional minus and put it in the subpattern?
I want to grab the time in the following and then use it for the name. Multiple names in the document. I seem to have it except for finding the optional minus sign that can occur with ele, lat and lon. I've only tried for lon so far and once I have the answer I'll expand it to the others. I get errors if I put the minus within the parentheses. I tried a -? within the parentheses too. How do I find the optional minus and put it in the subpattern?
My replace <name>\4 ACTIVE LOG</name> <trkseg> <trkpt lat=\"\1\" lon=\"\2\"> <ele>\3</ele> <time>\4</time> </trkpt>
This doesn't give errors but I can't find the optional minus and put it back in the replace. Maybe I'm going at this all wrong.
Thanks for any help.
-- 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+unsubscribe@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 "support@barebones.com" rather than posting to the group.
May 20
Ronald J Kimball Re: Beginner grep question. Optional minus find and replace
May 20, 2010; 14:42
Ronald J Kimball
Re: Beginner grep question. Optional minus find and replace
May 20
Kendall Conrad Re: Beginner grep question. Optional minus find and replace
May 20, 2010; 14:43
Kendall Conrad
Re: Beginner grep question. Optional minus find and replace
May 20
BBEdit user Re: Beginner grep question. Optional minus find and replace
May 20, 2010; 15:14
BBEdit user
Re: Beginner grep question. Optional minus find and replace
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!