Solved

Regex problem in seeing numbers in string

Posted on 2009-02-17
3
183 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 84

Accepted Solution

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

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

816 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now