D
Dustin D.
Let's say I have a text file with the following:
food {
fruits {
apples
oranges
pears
}
dairy {
ice_cream {
chocolate
vanilla
}
milk
}
}
I want to use a regular expression to crop out the "dairy" section.
That is, I want to find the word dairy and count the curly braces, and
using this, crop out a part of a file.
Is there an easy way to do this with regular expressions? I wrote a
function that counts letters and so forth, but it's not full-proof and
has some problems.
Thanks,
Dustin
food {
fruits {
apples
oranges
pears
}
dairy {
ice_cream {
chocolate
vanilla
}
milk
}
}
I want to use a regular expression to crop out the "dairy" section.
That is, I want to find the word dairy and count the curly braces, and
using this, crop out a part of a file.
Is there an easy way to do this with regular expressions? I wrote a
function that counts letters and so forth, but it's not full-proof and
has some problems.
Thanks,
Dustin