Re: getex replace
Thanks Bobby! Ravi. On Fri, Apr 18, 2008 at 9:31 AM, Bobby Hartsfield <[EMAIL PROTECTED]> wrote: > #replace(str, '#char(13)##chr(10)#memberUserName', '|memberUserName', > 'all')# > > -Or- > > #replace(str, '#char(13)##chr(10)##char(13)##chr(10)#', '|', 'all')# > > > With 18,000 blocks... you are bound to run into some data discrepancies so > look it over well. And for the love of god... if you are feeding that list > back to CF... use an array of structures or something instead of a list > :-) > > ..:.:.:.:.:.:.:.:.:.:.:.:. > Bobby Hartsfield > http://acoderslife.com > http://cf4em.com > > > -Original Message----- > From: [STS] Ravi Gehlot [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 17, 2008 8:22 PM > To: CF-Talk > Subject: getex replace > > I have a list I obtained from export ldap members out of a ldap directory > in > LDIF format that looks like this: > > memberUserName: John Doe > memberAge: 34 > memberLocation: US > memberEmail: [EMAIL PROTECTED] > > memberUserName: Mary Doe > memberAge: 44 > memberLocation: US > memberEmail: [EMAIL PROTECTED] > > memberUserName: Jack Doe > memberAge: 86 > memberLocation: US > memberEmail: [EMAIL PROTECTED] > > I need to import this list of almost 18,000 members onto an SQL database. > So > what I want to do is to convert this LDIF file into one big list pipe > delimited, then loop through it and add it to the database. So I got: > > 1) File is read > file="#expandPath(/imports/testList.ldif)#" /> > > 2) Replace all new lines for commas > > > > Question here: How do I replace all EMPTY (BLANK LINES) like the ones > between memberUserName for pipes? > > > > Ravi Gehlot > Web Programmer & IT Specialist > > Sunshine Tech Solutions, LLC > http://www.sunshinetechsolutions.com > [EMAIL PROTECTED] > President > > > > > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303800 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: getex replace
#replace(str, '#char(13)##chr(10)#memberUserName', '|memberUserName', 'all')# -Or- #replace(str, '#char(13)##chr(10)##char(13)##chr(10)#', '|', 'all')# With 18,000 blocks... you are bound to run into some data discrepancies so look it over well. And for the love of god... if you are feeding that list back to CF... use an array of structures or something instead of a list :-) ..:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com -Original Message- From: [STS] Ravi Gehlot [mailto:[EMAIL PROTECTED] Sent: Thursday, April 17, 2008 8:22 PM To: CF-Talk Subject: getex replace I have a list I obtained from export ldap members out of a ldap directory in LDIF format that looks like this: memberUserName: John Doe memberAge: 34 memberLocation: US memberEmail: [EMAIL PROTECTED] memberUserName: Mary Doe memberAge: 44 memberLocation: US memberEmail: [EMAIL PROTECTED] memberUserName: Jack Doe memberAge: 86 memberLocation: US memberEmail: [EMAIL PROTECTED] I need to import this list of almost 18,000 members onto an SQL database. So what I want to do is to convert this LDIF file into one big list pipe delimited, then loop through it and add it to the database. So I got: 1) File is read 2) Replace all new lines for commas Question here: How do I replace all EMPTY (BLANK LINES) like the ones between memberUserName for pipes? Ravi Gehlot Web Programmer & IT Specialist Sunshine Tech Solutions, LLC http://www.sunshinetechsolutions.com [EMAIL PROTECTED] President ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303732 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
getex replace
I have a list I obtained from export ldap members out of a ldap directory in LDIF format that looks like this: memberUserName: John Doe memberAge: 34 memberLocation: US memberEmail: [EMAIL PROTECTED] memberUserName: Mary Doe memberAge: 44 memberLocation: US memberEmail: [EMAIL PROTECTED] memberUserName: Jack Doe memberAge: 86 memberLocation: US memberEmail: [EMAIL PROTECTED] I need to import this list of almost 18,000 members onto an SQL database. So what I want to do is to convert this LDIF file into one big list pipe delimited, then loop through it and add it to the database. So I got: 1) File is read 2) Replace all new lines for commas Question here: How do I replace all EMPTY (BLANK LINES) like the ones between memberUserName for pipes? Ravi Gehlot Web Programmer & IT Specialist Sunshine Tech Solutions, LLC http://www.sunshinetechsolutions.com [EMAIL PROTECTED] President ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303707 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4