another search and replace bug with newlines

If reporting a bug with the Zeus IDE please post the details here. Please do not post questions here.
Post Reply
gwgs
Posts: 87
Joined: Tue Nov 21, 2006 6:30 pm
Location: Auckland

another search and replace bug with newlines

Post by gwgs »

if i use the search string

Code: Select all

(CALL errorlog\()([A-Za-z0-9_.,' \[\]\\"\|\)\(\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n]+)(\)$)
and replacement string of

Code: Select all

LET l_errormsg = \2\n      \1l_errormsg\3
with this piece of code

Code: Select all

                      CALL errorlog("INSERT INTO stockdet(sdprodno, sdwhseno, sddet1, sddet2, \n", 
                                   "sdcost, sddmyrec, sdexpiredmy, sdonconsign, \n", 
                                   "sdsaleable, sdsupplier, sdsuppslip,sdordrno,\n", 
                                   "sdohdqty, sdallqty, sdordqty, ", 
                                   "sdborqty, sdforqty, sdconsignohdqty)\n", 
                        "VALUES (", m_t1line[m_arr_curr].prodno CLIPPED, "|",  
                                    m_thdr.twhse                CLIPPED, "|", 
                                    l_sddet1_to                 CLIPPED, "|", 
                                    l_select_from               CLIPPED, "|\n", 
                                    l_stockdet_from.sdcost      CLIPPED, "|", 
                                    m_thdr.trandmy              CLIPPED, "|", 
                                    l_stockdet_from.sdexpiredmy CLIPPED, "|", 
                                    l_stockdet_from.sdonconsign CLIPPED, "|\n", 
                                    l_stockdet_from.sdsaleable  CLIPPED, "|", 
                                    l_stockdet_from.sdsupplier  CLIPPED, "|", 
                                    l_stockdet_from.sdsuppslip  CLIPPED, "|", 
                                    l_stockdet_from.sdordrno    CLIPPED, "|\n", 
                                    "0|0|0|0|0|0)")

i get the result of

Code: Select all

                      LET l_errormsg = "INSERT INTO stockdet(sdprodno, sdwhseno, sddet1, sddet2, 
", 
                                   "sdcost, sddmyrec, sdexpiredmy, sdonconsign, 
", 
                                   "sdsaleable, sdsupplier, sdsuppslip,sdordrno,
", 
                                   "sdohdqty, sdallqty, sdordqty, ", 
                                   "sdborqty, sdforqty, sdconsignohdqty)
", 
                        "VALUES (", m_t1line[m_arr_curr].prodno CLIPPED, "|",  
                                    m_thdr.twhse                CLIPPED, "|", 
                                    l_sddet1_to                 CLIPPED, "|", 
                                    l_select_from               CLIPPED, "|
", 
                                    l_stockdet_from.sdcost      CLIPPED, "|", 
                                    m_thdr.trandmy              CLIPPED, "|", 
                                    l_stockdet_from.sdexpiredmy CLIPPED, "|", 
                                    l_stockdet_from.sdonconsign CLIPPED, "|
", 
                                    l_stockdet_from.sdsaleable  CLIPPED, "|", 
                                    l_stockdet_from.sdsupplier  CLIPPED, "|", 
                                    l_stockdet_from.sdsuppslip  CLIPPED, "|", 
                                    l_stockdet_from.sdordrno    CLIPPED, "|
", 
                                    "0|0|0|0|0|0)"
      CALL errorlog(l_errormsg)
the \n in the code block gets translated to an actual new line

Grant
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

This is the same limitation as mentioned earlier: http://www.zeusedit.com/zforum/viewtopic.php?t=6982

Based on the Zeus internals, I'm not sure what could be done to fix this :?

Open to any suggestions.

Cheers Jussi
Post Reply