![]() ![]() Since captured group 13 was blank, all my variable names were replaced with 0. ![]() Had I done so, I would have seen that BBEdit was interpreting my replacement pattern as “Captured group 13, followed by 0” instead of “Captured group 1, followed by 30,” which was what I intended. But I wasn’t clever enough to notice the blue coloring in the replacement pattern. And because I think I’m clever, I didn’t want to do three non-regex replacements, one each for a10, v10, and x10. I couldn’t just replace 10 with 30 because there were instances of 10 in the code that weren’t related to the variables. I brought up BBEdit’s Find window and entered this: The variables were named a10, v10, and x10, and I wanted to change them to a30, v30, and x30, respectively. ![]() I thought it would be a simple regex find/replace, and it was. Next post Previous post Regex groups and numeralsĪ week or so ago, I was editing a program and decided I should change some variable names. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |