Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Regex problem in seeing numbers in string

Posted on 2009-02-17
3
Medium Priority
?
190 Views
Last Modified: 2012-05-06
vb.net 2003

Access 2003

I have a string I'm examining during a regex.

temp = "CABLE TIE NATURAL 15 INCH"

When the regex sees this string "specifically the  "15"
temp = Regex.Replace(temp, " .5 ", " .5 0.5 .50 0.50 1/2 ")

It converts the string to
CABLE TIE NATURAL .5 0.5 .50 0.50 1/2 INCH  1/2~13
I'm not looking for ".5"  but  "15"   ???

Thanks
fordraiders





0
Comment
Question by:Fordraiders
3 Comments
 
LVL 4

Expert Comment

by:RamanaChoudary
ID: 23661378
you can find all kind of regular expression here
http://regexlib.com/DisplayPatterns.aspx?cattabindex=2&categoryId=3
0
 
LVL 3

Author Comment

by:Fordraiders
ID: 23661458
Thanks, but it does not answer the question directly...

I need to know why the 15  is converting to   .5 0.5 .50 0.50 1/2


sorry  "1/2~13"  is not the probem here my mistake for posting..
 
0
 
LVL 85

Accepted Solution

by:
ozo earned 2000 total points
ID: 23663918
Regex.Replace(temp, " [.]5 ", " .5 0.5 .50 0.50 1/2 ")
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month8 days, 2 hours left to enroll

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question