I need to find each of the following and replace each complex with nothing (blank):
<checkbox label="abc" id="1234" separator=''>
</checkbox>
<checkbox label="abc" id="xyz" separator=''>
</checkbox>
<checkbox label="abc" id="wz23" separator=''>
</checkbox>
Your help is appreciated.
Jack
Search and Replace
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
Ben, thank you. I have another similar request:
I need to remove the following first statement and replace it with [nothing], but I want to keep the second statement: (The ids are differentiated by text and quotations. I want to keep the statement which has the quotations)
<checkbox label="abc" id='xxyxx' separator=" ">
</checkbox>
<checkbox label="abc" id="abcxxx" separator=" ">
</checkbox>
Jack
I need to remove the following first statement and replace it with [nothing], but I want to keep the second statement: (The ids are differentiated by text and quotations. I want to keep the statement which has the quotations)
<checkbox label="abc" id='xxyxx' separator=" ">
</checkbox>
<checkbox label="abc" id="abcxxx" separator=" ">
</checkbox>
Jack
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
Ben, after I re-read my statement, it was unclear-sounding to me. Here is specifically what I want:
I have several lines of xml code which contain an id statement enclosed with ' '. I have others which contain an id statement enclosed with " ".
Examples:
<checkbox element="severity;hpi" label="Chills" id-type="6" id='associated chills ... ' separator=" "><start>There are <b>chills.</b> </start></checkbox>
<checkbox element="severity;hpi" label="Chills" id-type="6" id="associated chills post ..." separator=" "><start>There are <b>chills.</b> </start></checkbox>
The content within the id is different for each statement. I want to remove any statement with the label "Chills" which also contains an id that is delineated with ' ', without affecting or removing the statement with the label "Chills" which contains an id that is delineated with " ".
As always, I appreciate and thank you for your help.
Jack
I have several lines of xml code which contain an id statement enclosed with ' '. I have others which contain an id statement enclosed with " ".
Examples:
<checkbox element="severity;hpi" label="Chills" id-type="6" id='associated chills ... ' separator=" "><start>There are <b>chills.</b> </start></checkbox>
<checkbox element="severity;hpi" label="Chills" id-type="6" id="associated chills post ..." separator=" "><start>There are <b>chills.</b> </start></checkbox>
The content within the id is different for each statement. I want to remove any statement with the label "Chills" which also contains an id that is delineated with ' ', without affecting or removing the statement with the label "Chills" which contains an id that is delineated with " ".
As always, I appreciate and thank you for your help.
Jack
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
This will only work if each checkbox element is entirely on one line and if there is only one checkbox element on any line.Find what: <checkbox [^>]*label="Chills" [^>]*id='[^']*'[^>]*>.*</checkbox>\n
Replace with: [nothing]
[X] Regular expression
Replace All
(The choice of element as an attribute name for an element may lead to confusion...)