So I am fairly new to python and am only self taught in this particular language, but I have hit a bit of a snag.
What I am trying to do is build a string that has with in it a digit that can be of any length or pattern. For example:
"Data_image_%s.%d" %(myStr, r'[0-9]+')
# Well, this won't actually work since %d is expecting an integer,
# but you get the idea.
When I do this I get back
Data_image_picture.[0-9]+.png
The ultimate objective is to create a string that reads like: Data_image_picture.1234567.png
Any thoughts on how I might go about correcting this?
Edit: What I am trying to do is take images off my companies website but the image url is dynamic depending on who and when the images are loaded to the browser. So the format is typically "data_image_Joe_session#id.png
Edit 2: I think I have been going about this problem the wrong way, I'll likely need to parse through the data to figure what string patterns I need, instead of creating a one size fits all string like I have been doing.
Thank you for your time and help
Data_image_picture.0.pngtoData_image_picture.9223372036854775807.png?idbefore trying to generate theData_image_picture...blahblah? I mean... Are you gonna know what number you need to add to it? If that's the case, what @TanveerAlam or @Hackaholic posted below should be good.