Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
regular expression
#2
I'm no expert but, since what you want to retrieve are a lot of lines, maybe you can just loop through the file lines, see if '[DAT_23]' is in one line, start retrieving, and then stop when you find '[ END ]'. If you think these substrings could actually appear somewhere else and "confuse" the program, you could use the regular expression to match them at the specific parts of the string (i.e. right at the beginning or end).
Reply


Messages In This Thread
regular expression - by pramod - Jul-07-2020, 05:29 AM
RE: regular expression - by karkas - Jul-10-2020, 06:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Regular Expression stahorse 9 1,615 Jul-31-2023, 01:20 PM
Last Post: Will_Robertson
  regular expression pramod 6 3,042 Jul-04-2020, 04:58 AM
Last Post: pramod
  regular expression pramod 4 2,108 Jun-16-2020, 02:01 AM
Last Post: pramod
  regular expression pramod 2 1,653 May-05-2020, 02:36 AM
Last Post: pramod

Forum Jump:

User Panel Messages

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