|
|
|
|
|
by jayyhu
580 days ago
|
|
Consider a scenario where you're editing a function: function foo() { return a*2.1^2+0.52/2 }
So you do a find-all regex "1.*5" and delete all matching occurrences (à la CRISPER) to get: function foo() { return a*2.2/2 }
But unbeknownst to you, the code is littered with a bunch of commented out versions of the same function you're trying to edit: /* function foo() { return a*1.5/2.1 } */
/* function foo() { return a*1.95/2.4 } */
And now those commented out versions now become: /* function foo() { return a*/2.1 } */
/* function foo() { return a*/2.4 } */
And now the whole program doesn't compile anymore--or your patients get Leukemia. Oops. |
|
¹ https://stackoverflow.com/questions/1732348/regex-match-open...