Python Forum
steps to debug regular expressions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
steps to debug regular expressions
#4
the re.VERBOSE flag isn't helping any. it lets me write weirder expressions. at least re.DEBUG helped a little.

what seemed to be happening was that it was applying my compiled pattern to the whole string, not just a portion (as seen in things like the egrep command). so i filled out the expression with ^.* and .*$ to make it applicable to the whole string. that made it work.

the re.DEBUG flag was interesting. i made a little command to compile expressions with that flag. it let me see what they get compiled into (presumably in the form of some coding).
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
steps to debug regular expressions - by Skaperen - Oct-22-2019, 12:25 AM
RE: steps to debug regular expressions - by Larz60+ - Oct-22-2019, 06:16 PM
RE: steps to debug regular expressions - by Skaperen - Oct-22-2019, 10:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  this message show up for me. cant debug notinhg here davidthomas 0 1,223 Jun-29-2023, 05:44 PM
Last Post: davidthomas
  How in Eclipse recognize debug / run mode? AlekseyPython 1 2,898 Mar-21-2019, 08:26 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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