I'm stuck for a while now at a regular expression to remove a certain code block from a BCS file. Whatever I try, it either does nothing or swallows everything in the file.
This is my TP2 code (the one which swallows all):
COPY_EXISTING ~ar5504.bcs~ ~override~ DECOMPILE_BCS_TO_BAF REPLACE_TEXTUALLY CASE_SENSITIVE EVALUATE_REGEXP ~^IF[%LNL%].*OnCreation()\([%LNL%].*\)+END$~ ~~ COMPILE_BAF_TO_BCS BUT_ONLY_IF_IT_CHANGES
And this is the script block I want to remove:
IF
OnCreation()
Global("MONKSPAWNEDSMUGGLERPLOT","GLOBAL",2)
Global("FADEDIN","MYAREA",0)
!Global("Enclave","GLOBAL",2)
THEN
RESPONSE #100
FadeToColor([1.0],0)
Wait(2)
FadeFromColor([30.0],0)
SetGlobal("FADEDIN","MYAREA",1)
END
// more code blocks...
Maybe I'm missing something obvious, but I'm at my wits end for now. Any help is appreciated.
Edited by argent77, 27 February 2012 - 01:24 PM.












