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

  • Home
  • SEARCH
  • 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 801275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:25:02+00:00 2026-05-14T23:25:02+00:00

Inputs Papaya 2 Apple 1 & 2 Orange 1, 2 & 3 Kiwi 1

  • 0

Inputs

Papaya 2
Apple 1 & 2
Orange 1, 2 & 3
Kiwi 1 - 4
Banana1-4
Breadfruit

Desired Outputs

Papaya 2
Apple 1
Apple 2
Orange 1
Orange 2
Orange 3
Kiwi 1
Kiwi 2
Kiwi 3
Kiwi 4
Banana 1
Banana 2
Banana 3
Banana 4
Breadfruit

How can I do this? My thinking is a combination of Regex to detect the presence of these differing suffices and generating the missing numbers where necessary.

The language in question is CloverETL’s CTL. Using their Normalizer component to perform some data cleanup. However, I’ll take any language…translation is easy.

  • 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. Editorial Team
    Editorial Team
    2026-05-14T23:25:03+00:00Added an answer on May 14, 2026 at 11:25 pm

    The last part can be matched by (?:\d+, )*\d+ & \d+$. Though you may wanna replace the spaces with \s+. Once you have the matching string, splitting it by [,&\s]+ will give you each number.

    Actually, if you use ^(\D+) ((?:\d+, )*\d+ & \d+)$, matching should return a list like [“the first part”, “the numbers”]. So you get everything. Split the second string, and there ya go.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's imagine I got this: index.php generates form with unpredictable number of inputs with
Given inputs 1-32 how can I generate the below output? in. out 1 1
I am taking inputs in Ruby like this: lines = STDIN.readlines.map{|x| x.strip.to_i}.sort This takes
i want to take inputs like this 10 12 13 14 15 16 ..
I have some dynamically created inputs which are not server-side controls. I want to
I'd like to track changes in inputs in a form via javascript. My intent
How to get the checked option in a group of radio inputs with JavaScript?
I have a form element that contains multiple lines of inputs. Think of each
I have code to create another row (div with inputs) on a button click.
Like, testing for : invalid inputs (strings containing 's) giving random id's in url

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.