in reply to extracting data from string
but a single statement has to do it
Why? You seem to optimize for a really silly thing. The code should be understandable and robust. See also: The path to mastery.
Anyway, you can do this:
for ("!defined(FLOAT_CODE)", "defined(FIXED_CODE)") { /^(!?)defined\((\w+)\)/ and print "$1$2\n"; }
|
|---|