![]() |
#1 |
Member
![]() Posts: 17
Karma: 10
Join Date: Apr 2017
Device: Tolino
|
Sigil Find and replace
Hallo, my english is not so god, i am from German.
I want to delete tags in a specific position or on specific Tag or all. I have for example <p class="MsoNormal">Karn der Taure wanderte nun schon einen Monat durch den neuen Kontinent Pandaria. Mit 2,3 Metern war er von durchschnittlicher Größe für sein Volk. Und als Paladin sah er es als seine Pflicht an das böse zu bekämpfen wo immer es drohte. Deshalb war er nach Pandaria gekommen, aber das war nur der offizielle Grund...</p> Ho can i delete this Tags <p class="MsoNormal"> </p> togehter? please help me. Thanks |
![]() |
![]() |
![]() |
#2 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
If all you are trying to do is to remove the 'class="MsoNormal">' then
search: <p class="MsoNormal"> replace with: <p> tschuss, |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
If you are trying to save some of the searched text and re-use it then:
search: <p class="MsoNormal">(.*?)</p> replace: <p>\1</p> |
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 17
Karma: 10
Join Date: Apr 2017
Device: Tolino
|
I mean all delete all the Tags <p class="MsoNormal"> and thies tag to <p> and replace white nothing so the text is alone example
<p class="MsoNormal">Der Panda, seiner Kleidung nach ein Schamane, sah ihn kurz an und bedeutete sich ihm dann zu setzen.</p> the red are delete and the text only blue example Der Panda, seiner Kleidung nach ein Schamane, sah ihn kurz an und bedeutete sich ihm dann zu setzen. thies option are not working Last edited by Michit1; 04-13-2017 at 03:34 PM. |
![]() |
![]() |
![]() |
#5 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
OK,
search: <p class="MsoNormal">(.*?)</p> replace: \1 edit: make sure you have REGEX mode selected in the search and replace options |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() Posts: 17
Karma: 10
Join Date: Apr 2017
Device: Tolino
|
I have this so making but is not working on the bigger Text passage, by the small Text passage is he working why?
<p class="MsoNormal">Er ging hin und Stellte sich vor:</p> is workin on this <p class="MsoNormal">„Hallo ich bin Karn, habt ihr etwas dagegen wenn ich euch Gesellschaft leiste?"</p> not working on this is more Text or what the problem? |
![]() |
![]() |
![]() |
#7 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
If they are on multiple lines (different line numbers) you may need to select the "DotAll" option. If they are on the same line then I'm not sure why it would do that.
|
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,561
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Use my TagMechanic plugin (unless you're looking for some extra regex practice, of course).
Though I highly recommend caution. If the p tags you're removing are not within a div, then you're going to have invalid code. Text must be contained within a block-level element of some kind. Text can't have the body tag as it's immediate parent. Last edited by DiapDealer; 04-13-2017 at 05:33 PM. |
![]() |
![]() |
![]() |
#9 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
If you are just trying to delete all of those tags then you can perform multiple replaces.
search: <p class="MsoNormal"> replace: (nothing) and search: </p> replace: (nothing) However, if you are just trying to copy the text - without the tags - into another file/format then you could just switch Sigil to Book View and highlight copy/paste. |
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 17
Karma: 10
Join Date: Apr 2017
Device: Tolino
|
Yes that was the error, multiple lines. Thanks you
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil find and replace page numbers | montalex | Sigil | 8 | 03-28-2017 08:51 PM |
Sigil Wildcards/Regex Find/Replace | Adman35 | Sigil | 7 | 08-16-2014 01:02 PM |
Regex Help: Find page number & Replace+Remove 2x Line Breaks in Sigil | Contre-jour | Sigil | 9 | 02-01-2013 10:47 AM |
Sigil find/replace box | LucyLu | Sigil | 2 | 05-28-2012 11:33 AM |
Find/Replace Won't Find | Rand Brittain | Sigil | 7 | 09-24-2011 04:35 AM |