473,413 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

parse number range

1
how to find numbers entered in textbox that have a dash showing a range of numbers. UI enters numbers that can be anything. ie 1,2,5-10,55....etc.
need to find the numbers between 5 and 10 and convert all numbers entered into a string
May 26 '10 #1
1 3367
tlhintoq
3,525 Expert 2GB
Looks like an Adobe printing page range selection clone.

You'll have to write your own logic for that. There is no built-in control or .NET framework function for that.

I would probably use string.split to break the one string into an array at the commas.
Then check each array index for a hyphen
If there is one, parse the text before the hyphen as 'from, and after the hypen as 'to', then add each number in between (in a loop maybe)
May 26 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Fiaz Idris | last post by:
I am an access newbie and I have the following question. Say, There is a text box in a form for input a number range and the user inputs the following. TextBox: AA123453,57-59,500,505-507,556...
5
by: Navid Azimi | last post by:
What's the best way to parse a currency string to a decimal given the possibility of multiple currencies? That is, my numeric string can be ($12.00) or -£12.00; in either case I want -12.00 to be...
2
by: Bill Wayne | last post by:
Hi, I'm trying to figure out a way to convert some Dungeons and Dragons treasure lists into bracketed numbers. For example: 01-18 - - Protection +1 19-28 - - Feather falling ...
3
by: jppl2000 | last post by:
I have more than 3 different choices, ( ab, cd, ef, ghij, kl). They are also aphanumeric, (.01 ab, 6 cd, .50 ef, 8 ghij),etc. The numbers may range from .01 to 8.0. The letters will always...
13
by: prileep | last post by:
if i use java.util.Random i can create random numbers. But how do i can define a Random object that its methods like nextInt() should return between two specified numbers(Eg: i want to create...
30
by: bdsatish | last post by:
The built-in function round( ) will always "round up", that is 1.5 is rounded to 2.0 and 2.5 is rounded to 3.0. If I want to round to the nearest even, that is my_round(1.5) = 2 # As...
50
by: John Salerno | last post by:
I know it's popular and very handy, but I'm curious if there are purists out there who think that using something like: for x in range(10): #do something 10 times is unPythonic. The reason I...
5
by: dio66 | last post by:
Hi, I’m basically a Newbie in this posting of new threads and in the MS Access as well. I spend a lot of hours trying to get this answer out of the Internet and 6 different books of MS...
11
by: technet | last post by:
I am using Access 2007. I created a serial number database that imports excel into a table. I have now been asked if they can import a range of numbers directly into access. I have a single entry...
10
by: fil66 | last post by:
Hi There, Is it possible to expand Hex number range? Here is what I have in a text file... 002A:002F 03E0:03E0 03E2:03E2 07AF:07B1
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.