Solved

Regex problem in seeing numbers in string

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…

839 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