• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Unique Replace Function

Guest
Feb 17, 2008 Feb 17, 2008

Copy link to clipboard

Copied

Hi,

I'm working with a comma delimited file. In some fields, I run into a situation like this:

, "1,0000",

The first comma and the last comma are delimiters. The comma that is enclosed within the quotes is causing the problem. Is there a replace function that can find the " then kill the comma, but still leave all the delimiters alone?

Any thoughts would be appreciated!

cfwild
TOPICS
Advanced techniques

Views

495

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 17, 2008 Feb 17, 2008

Copy link to clipboard

Copied

cfhttp may be helpful. After you upload the file you can use the name attribute to convert it to a query. There is something in there as well where you can specify quotes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 21, 2008 Feb 21, 2008

Copy link to clipboard

Copied

Yes, there is a replace function. It even has an example of eliminating all commas from a string.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 21, 2008 Feb 21, 2008

Copy link to clipboard

Copied

Hi,

I'm attaching the code I wrote to go through all of these. It works fine, but I'm thinking there has to be an faster way to proceed. (Code A)

I also wrote a regular expression that gets me close, but no easy way to use a Replace or REPlace function.

Any thoughts on speeding this up would be appreciated!

cfwild

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 21, 2008 Feb 21, 2008

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 21, 2008 Feb 21, 2008

Copy link to clipboard

Copied

LATEST
Hi,

I've continued to modify the original code. I'm now using a Regular Expression to try and speed this up. I've also nested some of the code. If you can think of ways to speed this up, into more of a one line REReplace type function, I'd appreciate the input.

Thanks to all for their input.

Ciao,

cfwild

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation