Hi there! Using 1.1b5 on PBG4/867, 10.3.8, 512M RAM searching this one line: Sue Xxxxxxx 1244 Xxxx Street Bath ME 04530 USA (it's wrapping-8 tabs between last name and street) for this pattern: ^(*[^\t])\t(*[^\t]){8}\t replacing with this: $1\t$2\t searching selection only, regex on, hit replace and find 1)spinning pizza wheel of death 2)swapping hard drive of death 3)watch swap go from 1 to 2 gig in less than a minute... 4)page faults between 2,000 and 20,000 every 2 seconds, cpu about 50-60% textmate 5)get scared, force quit 6)repeat.... Any thoughts? I'm guessing it's a stupid regex mistake on my part, but I can't find it. Thanks for your help.
Cheers,
Dameron
On Apr 1, 2005, at 23:14, Dameron Midgette wrote:
^(*[^\t])\t(*[^\t]){8}\t
I think this should probably be:
^([^\t]*)\t([^\t]*){8}\t
replacing with this: $1\t$2\t
Since you have 'repeat 8 times' last, the capture registers ($1 & $2) will contain only the captures from the last repeat.
searching selection only, regex on, hit replace and find 1)spinning pizza wheel of death
This is a known bug. The problem is when you do a repeat without a preceding character, like your * which had nothing to repeat -- basically the regex library will then go into infinite loop, applying a zero width pattern to the text. Something I will fix before 1.1 final.
At 4:14 PM -0500 4/1/05, Dameron Midgette wrote:
Sue Xxxxxxx 1244 Xxxx Street Bath ME 04530 USA (it's wrapping-8 tabs between last name and street) for this pattern: ^(*[^\t])\t(*[^\t]){8}\t replacing with this: $1\t$2\t
Those *'s are in bad places. If you want to match a greedy string of non-tab characters ending in a tab, do ([^\t]*)\t. I don't understand what "wrapping-8 tabs" means enough to help you more...
By the way I know Allan is aware that some truly mangled regexps (no offense... I myself have sent in some spectacular ones to him) crash TM, and that shouldn't happen.
best, Eric
Hi! Like I said, stupid regex mistake :P (pig regex?) I was using * and {8} to try and modify the next item to the *right*; e.g. intending to match 8 tabs at the end. "Wrapping 8 tabs" meant that the line I searched wrapped in my email client, but had 8 tabs between last name and address. Many thanks to you both for the clarification and status report. TM is truly amazing. I'm not an editing geek, and just in the last two days, TM has saved me over 2 hours of work. Thank you, allan, and everyone else on the list for a dynamic and creative environment for exploration.
Cheers,
Dameron On Apr 1, 2005, at 4:42 PM, Eric Hsu wrote:
At 4:14 PM -0500 4/1/05, Dameron Midgette wrote:
Sue Xxxxxxx 1244 Xxxx Street Bath ME 04530 USA (it's wrapping-8 tabs between last name and street) for this pattern: ^(*[^\t])\t(*[^\t]){8}\t replacing with this: $1\t$2\t
Those *'s are in bad places. If you want to match a greedy string of non-tab characters ending in a tab, do ([^\t]*)\t. I don't understand what "wrapping-8 tabs" means enough to help you more...
By the way I know Allan is aware that some truly mangled regexps (no offense... I myself have sent in some spectacular ones to him) crash TM, and that shouldn't happen.
best, Eric
Eric Hsu, Assistant Professor of Mathematics San Francisco State University erichsu@math.sfsu.edu http://math.sfsu.edu/hsu ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate