Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
GeneralRe: Text Validation Pin
Herman<T>.Instance14-Apr-08 2:38
Herman<T>.Instance14-Apr-08 2:38 
QuestionHow to manipulated arraylist or remove() of arraylist? Pin
vishalcodeproj13-Apr-08 23:36
vishalcodeproj13-Apr-08 23:36 
AnswerRe: How to manipulated arraylist or remove() of arraylist? Pin
Christian Graus13-Apr-08 23:38
protectorChristian Graus13-Apr-08 23:38 
GeneralDataTable.Merge() Method Pin
half-life13-Apr-08 23:32
half-life13-Apr-08 23:32 
Questionhow i apply encript and decript operations in C# Pin
saiftanoli13-Apr-08 23:27
saiftanoli13-Apr-08 23:27 
AnswerRe: how i apply encript and decript operations in C# Pin
Christian Graus13-Apr-08 23:37
protectorChristian Graus13-Apr-08 23:37 
GeneralRetrieving Records from Excel Pin
Dotnetkanna13-Apr-08 23:11
Dotnetkanna13-Apr-08 23:11 
GeneralRegex.Replace Enquiry [modified] Pin
livez13-Apr-08 23:09
livez13-Apr-08 23:09 
Hello!

I´ve got this regular expression:

Regex.Replace(amount.Value.ToString(), @"(?<=^-?\d+)(?=\d{3}$)", ".")

it takes a value and returns it formated like this:

1 -> 1<br />
12 -> 12<br />
123 -> 123<br />
1234 -> 1.234<br />
12345 -> 12.345<br />
123456 -> 123.456


problem arises when number of digits are above 6, the code then returns

1234567 -> 1234.567

whereas I would want it to return

1234567 -> 1.234.567 and 12.345.678, 123.456.789 etc.
I realize the '$' character´s got go , since it means end of string, but if I remove it I get really strange results.

Could someone help me alter the expression to achive this?

modified on Monday, April 14, 2008 5:23 AM

GeneralRe: Regex.Replace Enquiry Pin
Christian Graus13-Apr-08 23:36
protectorChristian Graus13-Apr-08 23:36 
GeneralRe: Regex.Replace Enquiry Pin
livez14-Apr-08 1:33
livez14-Apr-08 1:33 
GeneralLazy Loading Pin
satsumatable13-Apr-08 23:09
satsumatable13-Apr-08 23:09 
GeneralRe: Lazy Loading Pin
Christian Graus13-Apr-08 23:35
protectorChristian Graus13-Apr-08 23:35 
QuestionMultiLanguage Support for MessageBox YesNo button Pin
cooltoad12313-Apr-08 22:50
cooltoad12313-Apr-08 22:50 
GeneralRe: MultiLanguage Support for MessageBox YesNo button Pin
N a v a n e e t h13-Apr-08 22:58
N a v a n e e t h13-Apr-08 22:58 
GeneralRe: MultiLanguage Support for MessageBox YesNo button Pin
Christian Graus13-Apr-08 23:04
protectorChristian Graus13-Apr-08 23:04 
GeneralRe: MultiLanguage Support for MessageBox YesNo button Pin
cooltoad12313-Apr-08 23:09
cooltoad12313-Apr-08 23:09 
GeneralGenerate CREATE TABLE script from DataTable structure [modified] Pin
netDeveloper13-Apr-08 22:01
netDeveloper13-Apr-08 22:01 
Questionread and close image from file ?? Pin
Denver Thomas13-Apr-08 21:04
Denver Thomas13-Apr-08 21:04 
GeneralRe: read and close image from file ?? Pin
Christian Graus13-Apr-08 21:12
protectorChristian Graus13-Apr-08 21:12 
GeneralRe: read and close image from file ?? Pin
N a v a n e e t h13-Apr-08 21:15
N a v a n e e t h13-Apr-08 21:15 
GeneralRe: read and close image from file ?? Pin
Denver Thomas13-Apr-08 23:28
Denver Thomas13-Apr-08 23:28 
GeneralRe: read and close image from file ?? Pin
N a v a n e e t h13-Apr-08 23:49
N a v a n e e t h13-Apr-08 23:49 
GeneralRe: read and close image from file ??-image size Pin
Denver Thomas14-Apr-08 0:03
Denver Thomas14-Apr-08 0:03 
GeneralRe: read and close image from file ??-image size Pin
N a v a n e e t h14-Apr-08 0:53
N a v a n e e t h14-Apr-08 0:53 
GeneralRe: read and close image from file ?? Pin
Luc Pattyn14-Apr-08 2:01
sitebuilderLuc Pattyn14-Apr-08 2:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.