Hi, I can't seem to figure out a way to find and replace some numbers using Grep. This is what I have.
*<loc>2.2</loc><loc2>2.2.93</loc2>* I have many cases where there are 3 numbers separated by two periods wrapped in *<loc>* (like this: *<loc>2.2.309</loc>*) as well as the example above with 2 numbers separated by 1 period wrapped in* <loc>*. I want to find where there are only two numbers and delete that *<loc>* element. For example I tried: *<loc>[0-9]\.[0-9]</loc><loc2>[0-9]\.[0-9]\.[0-9]</loc2>* But that seems to only only single digits and I can't replace values. Example values in *<loc>* are: *<loc>1.13.333</loc>* *<loc>5.3.28</loc>* *etc.* The first number will be in the range of 1-5, the second will be 1-50, and the third will be 1-2300 (those ranges aren't as important, just for the number of digits to factor in). I imagine I could do all permutations of what I have above with single digits, but it seems there's surely a better way to find the <loc> elements containing only two numbers vs. three. Any guidance would be appreciated! Maybe the Bbedit shortcut menu for grep characters could add something like this? Thanks! Ron -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/2a89a49e-523a-4365-b8e1-50ae97e77873n%40googlegroups.com.