![]() |
#1 |
Member
![]() Posts: 14
Karma: 10
Join Date: Oct 2016
Device: ibooks
|
New to regex find and replace!
i'm sure for some people this is cake, i just have no clue how to get this regex to work correctly. i have 1000 snippets of code that look like this:
<p class="indent-arrow"><span class="_idGenBNMarker-1" lang="en-US" xml:lang="en-US" xmlns:xml="http://www.w3.org/XML/1998/namespace">1. </span>A BUNCH OF DIFFERENT TEXT FOR EACH OF THE 1000 POSTS</p> I need to change the beginning and ending text to this without harming the text for each post: <p class="bullists"><span>1. </span><span class="CharOverride-5">A BUNCH OF DIFFERENT TEXT FOR EACH OF THE 1000 POSTS</span></p> i found a snippet of code earlier that showed i can place (.+?) in place of the post text in the search box. It successfully caused the search to find and highlight every single post perfectly, but it doesn't replace correctly. instead it replaces the post text with (.+?) ...i'm so close, but i know i'm missing something. can anyone help please??? |
![]() |
![]() |
![]() |
#2 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,062
Karma: 168808721
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Code:
<p class="indent-arrow"><span class="_idGenBNMarker-1" lang="en-US" xml:lang="en-US" xmlns:xml="http://www.w3.org/XML/1998/namespace">(.*?)\. </span>(.*?)</p> Code:
<p class="bullists"><span>\1. </span><span class="CharOverride-5">\2</span></p> Last edited by DNSB; 11-06-2016 at 03:19 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 14
Karma: 10
Join Date: Oct 2016
Device: ibooks
|
Thank you so much!! this worked perfectly!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
regex cannot find to replace | eschwartz | Editor | 11 | 02-03-2014 11:00 PM |
Regex find and replace | SanatyrZeo | Sigil | 5 | 10-29-2012 07:03 AM |
Regex Find and Replace - Spaces | essayhead | Sigil | 2 | 08-10-2012 07:41 PM |
RegEx find and replace | iblesq | Sigil | 1 | 01-10-2011 09:26 PM |
REGEX find and replace help please | potestus | Sigil | 13 | 09-18-2010 04:14 PM |