Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular Expression Help
#1
Hi All

I wonder if somebody can help. I'm running a script to help me order files for a 3d pdf application...basically i have a software which outputs .stl files which the scripts puts into order so the 3d pdf can play as a small frame by frame progression.
My output files look like this:
VS_Subsetup1_Maxillar.stl
VS_Subsetup2_Maxillar.stl
VS_Subsetup3_Maxillar.stl
VS_Subsetup4_Maxillar.stl
VS_Subsetup5_Maxillar.stl
The script i'm running at the moment looks like this:
#re_frame = r'- 0*(\d+) -'
re_frame = r'_*(\d+)_'
But by using this script my team have to add an underscore before the number in order for the program to work.

Can anybody tell me how to solve this so that it works without making any changes to the file name?
Reply


Messages In This Thread
Regular Expression Help - by Dazzler - Apr-06-2018, 11:26 AM
RE: Regular Expression Help - by Gribouillis - Apr-06-2018, 12:13 PM
RE: Regular Expression Help - by ljmetzger - Apr-06-2018, 12:40 PM
RE: Regular Expression Help - by Dazzler - Apr-06-2018, 12:53 PM
RE: Regular Expression Help - by Gribouillis - Apr-06-2018, 01:57 PM
RE: Regular Expression Help - by ljmetzger - Apr-06-2018, 02:00 PM
RE: Regular Expression Help - by Dazzler - Apr-06-2018, 02:08 PM
RE: Regular Expression Help - by ljmetzger - Apr-08-2018, 03:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Regular expression help anilrajr 4 140 4 hours ago
Last Post: deanhystad
  data validation with specific regular expression shaheen07 0 366 Jan-12-2024, 07:56 AM
Last Post: shaheen07
  Regular Expression search to comment lines of code Gman2233 5 1,732 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,717 Jun-15-2022, 12:00 PM
Last Post: new_coder_231013
  Need help with my code (regular expression) shailc 5 1,980 Apr-04-2022, 07:34 PM
Last Post: shailc
  Regular Expression for matching words xinyulon 1 2,208 Mar-09-2022, 10:34 PM
Last Post: snippsat
  regular expression question Skaperen 4 2,542 Aug-23-2021, 06:01 PM
Last Post: Skaperen
  How can I find all combinations with a regular expression? AlekseyPython 0 1,696 Jun-23-2021, 04:48 PM
Last Post: AlekseyPython
  Python Regular expression, small sample works but not on file Acernz 5 3,000 Jun-09-2021, 08:27 PM
Last Post: bowlofred
  Regular expression: cannot find 1st number in a string Pavel_47 2 2,450 Jan-15-2021, 04:39 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

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