Reputation: 155
I'm trying to find blocks like these using regex. An example of the code I'm trying to find is shown bellow,
entity //This is what I want to select
{
"id" "2"
"classname" "light" //This is what it should contain
"_light" "255 255 255 200"
"_lightHDR" "-1 -1 -1 1"
"_lightscaleHDR" "1"
"_quadratic_attn" "1"
"origin" "-128 0 -128"
editor
{
"color" "220 30 220"
"visgroupshown" "1"
"visgroupautoshown" "1"
"logicalpos" "[0 0]"
}
}
How would I go forward finding this block? Blocks not containing "classname" "light" should not be selected. Can anyone help me out?
Upvotes: 2
Views: 1544