Macro/Method to copy lines with keyword to a new file
Posted: Mon Aug 03, 2009 11:48 am
Hi,
I need copy lines with a specific key word from one file into a new file.
From the below lines
version = {
project = ""
library = ""
item_passport = "aae94f37-48ad-11db-8a06-001143772852"
version_passport = "96091540-6041-11db-b80a-00123f756de7"
type = "LIB PART"
intent = "reference"
version_number = 3
filename = "1854106C_0107.prt"
name = "PIN_THERMOSTAT JIGGLE"
part_number = "N_104618"
revision = "-"
created = {
on = "20-Oct-2006 08:47:53.00"
}
i need to copy the text from lines having the key work item_passport and version_passport into a new text file.
For Eg: from the above example i need to copy
item_passport = "aae94f37-48ad-11db-8a06-001143772852"
version_passport = "96091540-6041-11db-b80a-00123f756de7"
Any help will be appreciated. Right now i am doing it manually and is a night mare.
I need copy lines with a specific key word from one file into a new file.
From the below lines
version = {
project = ""
library = ""
item_passport = "aae94f37-48ad-11db-8a06-001143772852"
version_passport = "96091540-6041-11db-b80a-00123f756de7"
type = "LIB PART"
intent = "reference"
version_number = 3
filename = "1854106C_0107.prt"
name = "PIN_THERMOSTAT JIGGLE"
part_number = "N_104618"
revision = "-"
created = {
on = "20-Oct-2006 08:47:53.00"
}
i need to copy the text from lines having the key work item_passport and version_passport into a new text file.
For Eg: from the above example i need to copy
item_passport = "aae94f37-48ad-11db-8a06-001143772852"
version_passport = "96091540-6041-11db-b80a-00123f756de7"
Any help will be appreciated. Right now i am doing it manually and is a night mare.