Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would at first use this regex to determine wether a comma or a dot is used as a comma delimiter (It fetches the last of the two):</p> <pre><code>[0-9,\.]*([,\.])[0-9]* </code></pre> <p>I would then strip all of the other sign (which the previous didn't match). If there were no matches, you already have an integer and can skip the next steps. The removal of the chosen sign can easily be done with a regex, but there are also many other functions which can do this faster/better.</p> <p>You are then left with a number in the form of an integer possible followed by a comma or a dot and then the decimals, where the integer- and decimal-part easily can be separated from eachother with the following regex.</p> <pre><code>([0-9]+)[,\.]?([0-9]*) </code></pre> <p>Good luck!</p> <p><strong>Edit:</strong></p> <p>Here is an example made in python, I assume the code should be self-explaining, if it is not, just ask.</p> <pre><code>import re input = str(raw_input()) delimiterRegex = re.compile('[0-9,\.]*([,\.])[0-9]*') splitRegex = re.compile('([0-9]+)[,\.]?([0-9]*)') delimiter = re.findall(delimiterRegex, input) if (delimiter[0] == ','): input = re.sub('[\.]*','', input) elif (delimiter[0] == '.'): input = re.sub('[,]*','', input) print input </code></pre> <p>With this code, the following inputs gives this:</p> <ul> <li><p><strong>111.111,11</strong> </p> <p>111111,11</p></li> <li><p><strong>111,111.11</strong></p> <p>111111.11</p></li> <li><p><strong>111,111</strong> </p> <p>111,111</p></li> </ul> <p>After this step, one can now easily modify the string to match your needs.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload