Having trouble with regular expressions
Posted: Mon Sep 24, 2007 6:09 pm
Hi,
I'm trying out the program and can't get a regular expression to work.
I want to batch replace the following (an example):
Into:
So basically I want to add "// " in front of every line that contains "fx_nicksmokeAI", that's the only part that sets it apart from other lines I don't want to change. The first number ranges from 0 - 19, the second is always 7, but it's not unique to lines I want to change. After that there are always three groups, the numbers can vary, positive, negative, can be 0, no decimals, 5 decimals, more, etc... After "AI" there are several combinations possible. And finally, the amount of spaces used varies from file to file.
Any help would be appreciated.
I'm trying out the program and can't get a regular expression to work.
I want to batch replace the following (an example):
Code: Select all
light.9 = 7, -16.874, -30.5, 1.25 , fx_nicksmokeAI_sm_lear // Engine 1
light.10 = 7, -19.024, -15.0, 0 , fx_nicksmokeAI_sm_lear // Engine 2
light.11 = 7, -19.024, 15.0, 0 , fx_nicksmokeAI_sm_lear // Engine 3
light.12 = 7, -16.874, 30.5, 1.25 , fx_nicksmokeAI_sm_lear // Engine 4
Code: Select all
// light.9 = 7, -16.874, -30.5, 1.25 , fx_nicksmokeAI_sm_lear // Engine 1
// light.10 = 7, -19.024, -15.0, 0 , fx_nicksmokeAI_sm_lear // Engine 2
// light.11 = 7, -19.024, 15.0, 0 , fx_nicksmokeAI_sm_lear // Engine 3
// light.12 = 7, -16.874, 30.5, 1.25 , fx_nicksmokeAI_sm_lear // Engine 4
Any help would be appreciated.