adding a dot with regular expression in OO

Discussion in 'Technical Analysis' started by flyingdutchmen, Dec 15, 2010.

  1. hoping this is in the right place here, if not mods feel free to move

    while using search and replace in OO writer i am trying to re-format an E Mini tick file.
    the file is in following format

    12/7/2010,03:30:00,122275,3
    12/7/2010,03:30:00,122300,2
    12/7/2010,03:30:01,122275,3
    12/7/2010,03:30:02,122300,50

    now i need an regex which will place a dot (.) after the 4th digit on the close stamp to retrieve the decimal value like this

    12/7/2010,03:30:00,1222.75,3
    12/7/2010,03:30:00,1223.00,2
    12/7/2010,03:30:01,1222.75,3
    12/7/2010,03:30:02,1223.00,50

    i guess a regex which will find an 6 digit value between two komma's and then place a dot after the 4th digit ?

    hoping for some help as i have no clue how to do this, all help will be appreciated
     
  2. Better to find the number after two commas and divide by 100.
     
  3. found it,

    search
    ,([0-9]{4})([0-9]{2}),
    replace
    ,$1.$2,