Python Forum
trying to recall a regex for re.split()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
trying to recall a regex for re.split()
#11
(May-18-2022, 06:17 PM)paul18fr Wrote: Provides the same result, isn't it ? but if you prefere re.split ...

on what basis should i make the choice between re.split() vs. re.search()?

reading the library reference it seems like if i use re.search(), i need to express just a pattern for what follows the number, which could be just about anything. in past help with module re the regex with re.split() was an expression of the whole thing, making it all hard to understand what was doing what. so if i needed something different i modified what i had or gave up. i don't have a clue how to start a regex from scratch to do these kinds of things, unless i am looking for specific things.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
RE: trying to recall a regex for re.split() - by Skaperen - May-18-2022, 10:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Split pdf in pypdf based upon file regex standenman 1 2,307 Feb-03-2023, 12:01 PM
Last Post: SpongeB0B
  recall cool_person 1 1,106 May-07-2022, 08:04 AM
Last Post: menator01

Forum Jump:

User Panel Messages

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