Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Non-greedy regex
#1
I am struggling to correctly set up a non-greedy regex to correct the following:

<a href=’tw://bible.*?id=1.2.7>Gen 2:7; <a href=’tw://bible.*?id=1.2.17>Gen 2:17; 5:29

Must become:
<a href=’tw://bible.*?id=1.2.7>Gen 2:7; <a href=’tw://bible.*?id=1.2.17>Gen 2:17; <a href=’tw://bible.*?id=1.5.7> Gen 5:29

Note the 1.5.7 refers to Genesis chapter 5 verse 7
Reply
#2
What have you tried?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Greedy algorithms on logical problems Opensourcehacker 0 1,541 Nov-22-2020, 05:12 PM
Last Post: Opensourcehacker
  Job Scheduling to be solved with Greedy algorithm hfan6206 1 3,502 Jun-05-2018, 04:02 AM
Last Post: hfan6206

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020