Python Forum
Regular expression: return string, not list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular expression: return string, not list
#3
If you want to get rid of a part of the string, why are you using a regex? Those are for matching strings. Just replace the bits you don't want with an empty string..
Reply


Messages In This Thread
RE: Regular expression: return string, not list - by ndc85430 - Jan-14-2021, 11:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Use or raw string on regular expressions Zaya_pool 5 335 May-09-2024, 06:10 PM
Last Post: Zaya_pool
  Regular expression help anilrajr 4 339 May-08-2024, 06:18 PM
Last Post: deanhystad
  data validation with specific regular expression shaheen07 0 382 Jan-12-2024, 07:56 AM
Last Post: shaheen07
  How do I calculate a ratio from 2 numbers and return an equivalent list of about 1000 Pleiades 8 15,865 Jan-05-2024, 08:30 PM
Last Post: sgrey
  Regular Expression search to comment lines of code Gman2233 5 1,746 Sep-08-2022, 06:57 AM
Last Post: ndc85430
  List Creation and Position of Continue Statement In Regular Expression Code new_coder_231013 3 1,736 Jun-15-2022, 12:00 PM
Last Post: new_coder_231013
  Need help with my code (regular expression) shailc 5 2,006 Apr-04-2022, 07:34 PM
Last Post: shailc
  Regular Expression for matching words xinyulon 1 2,218 Mar-09-2022, 10:34 PM
Last Post: snippsat
  Need to parse a list of boolean columns inside a list and return true values Python84 4 2,174 Jan-09-2022, 02:39 AM
Last Post: Python84
  printing an string instead of a expression Underscore 2 1,863 Oct-11-2021, 03:10 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