Python Forum
[SOLVED] [regex] Why isn't possible substring ignored?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] [regex] Why isn't possible substring ignored?
#3
Some titles look like this:
<title>My title - dummy</title>

Others look like this:
<title>My title</title>

If it's there, how can I get rid of the " - dummy" part?

I expected this to work, but it's ignored: ( - dummy)?
Reply


Messages In This Thread
RE: [regex] Why isn't possible substring ignored? - by Winfried - Apr-08-2023, 01:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [SOLVED] Can't figure out right regex Winfried 3 570 Mar-02-2025, 05:57 PM
Last Post: Winfried
  extract substring from a string before a word !! evilcode1 3 1,875 Nov-08-2023, 12:18 AM
Last Post: evilcode1
  [solved] Regex expression do not want to taken :/ SpongeB0B 2 4,150 Nov-06-2023, 02:43 PM
Last Post: SpongeB0B
  Help with a regex? (solved) wrybread 3 1,524 May-01-2023, 05:12 AM
Last Post: deanhystad
  [SOLVED] Alternative to regex to extract date from whole timestamp? Winfried 6 3,647 Nov-16-2022, 01:49 PM
Last Post: carecavoador
  ValueError: substring not found nby2001 4 11,143 Aug-08-2022, 11:16 AM
Last Post: rob101
  Match substring using regex Pavel_47 6 2,596 Jul-18-2022, 07:46 AM
Last Post: Pavel_47
  Substring Counting shelbyahn 4 7,429 Jan-13-2022, 10:08 AM
Last Post: krisputas
  [SOLVED] Why does regex fail cleaning line? Winfried 5 3,552 Aug-22-2021, 06:59 PM
Last Post: Winfried
  Python Substring muzikman 4 3,356 Dec-01-2020, 03:07 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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