Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 94721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:32:45+00:00 2026-05-10T23:32:45+00:00

I am working on this yahoo pipe Regex and I found a bug I’m

  • 0

I am working on this yahoo pipe Regex and I found a bug I’m unable to wrap my mind around it.

I have a URL, from which I extract digits, cat them and make a img html tag and embed it. The issue is that, the URL is presented in a non padded way, but the image linked has the zeroes. Therefore, when there is a day or a month with single digits, the regex stops working.

This is what I have so far:

The URL: http://www.penny-arcade.com/comic/2009/1/2/patently-ridiculous/ The RegEx: (\d{4})/(\d+)/(\d+) The Replacement: <img src='http://www.penny-arcade.com/images/$1/$1$2$3.jpg' />  What should appear: <img src='http://www.penny-arcade.com/images/2009/20090102.jpg' /> What appears: <img src='http://www.penny-arcade.com/images/2009/200912.jpg'/> 

How could I parse those zeroes as to make this thing work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:32:46+00:00Added an answer on May 10, 2026 at 11:32 pm

    If you can use more than one regular expression, here’s a workaround:

     search: (\d{4})/(\d)/ replace: $1/0$2/ search: (\d{4})/(\d{2})/(\d)/ replace: $1/$2/0$3/ search: (\d{2})/(\d{2})/(\d{2})/(.+)/ replace: <img src='http://www.penny-arcade.com/images/$1/$2$3.jpg' /> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why is my code only working for object2? function object1() { this.URL = yahoo.com;
I have this (working) CPU code: #define NF 3 int ND; typedef double (*POT)(double
I have this working: address = [] for row in ws.iter_rows(row_offset=4,column_offset=3): if len(row) >
I've got gmail and yahoo working, but not hotmail. Here's what I have, what
This may be the most obscure bug I have yet encountered in many years
This PHP function working just fine: if (preg_match (/<(\S+@\S+\w)>.*\n?.*55[0-9]/i,$body,$match)) { echo found!; } in
I have defined a few constants like this: define(TITLE_2,Yahoo); define(TITLE_3,Google); Next, I want to
I'm working on a ruby script to grab historical stock prices from Yahoo, using
I am working on a simple email importer script. From what posts on this
I am tired of working this out myself , i cannot understand the way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.