07-24-2012, 06:08 AM
Hello,
beginner needing help:
1)
What is the best way to retrieve everthing beneath "[config2]" until the next [...], I want to retrieve "cde" , "fgh" and "ijk"
[config1]
abc
[config2]
cde
fgh
ijk
[config3]
etc...
2)
How can I put a variable within a findrx regex pattern:
I want the string "config2" be replaced by a variable for exmple "var_config"
findrx(lines "^\[var_config](?:\r?\n(?:[^[\r\n].*)?)*" 0 8 x)
I tried {var_config}
I tried:
RunTextAsFunction2
But I keep against the double quotes problem
I also tried to replace the inner pair of double quotes with double single quotes like this: '' ... regex...''
thanks!
beginner needing help:
1)
What is the best way to retrieve everthing beneath "[config2]" until the next [...], I want to retrieve "cde" , "fgh" and "ijk"
[config1]
abc
[config2]
cde
fgh
ijk
[config3]
etc...
2)
How can I put a variable within a findrx regex pattern:
I want the string "config2" be replaced by a variable for exmple "var_config"
findrx(lines "^\[var_config](?:\r?\n(?:[^[\r\n].*)?)*" 0 8 x)
I tried {var_config}
I tried:
RunTextAsFunction2
But I keep against the double quotes problem
I also tried to replace the inner pair of double quotes with double single quotes like this: '' ... regex...''
thanks!