C# .NET4.5.1 Regex strange? -


I am reading those text files, which have decimal numbers in them. They can be made in "any" culture, so the decimal point can be different from the current culture.

So I use a regex to replace all the different CurrencyDecimalSeparators with the current.

I 'am using this code

  string output = regs. Replay (invalue, @ "[\. \ ?,; / -]", Culturinfo.Content Culture.NumberFormat.CurrencyDiscilatorSaPator);   

For example 1.25 - & gt; 1,25 (I'm in Sweden)

Now for my question: when I first tried it, I would call this regexp @ "[\.,; - - -?]" All characters replaced with the current renderer which did not work.

For example 1.25 - & gt; <,

// Anders

this / - \? Is due to this / to ? Is a character range of ( ? )

This includes the limit:

  / 0 1 2 3 4 5 6 7 8 9:; & Lt; = & Gt; ?   

If you see here image description here

here Enter

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -