Skip to main content
Solved

Hi, I'm trying to use the attribute manager to replace all instances of double quote marks " with single quote marks ' for the values of the attribute 'testo' @ReplaceRegularExpression(@Value(testo),",') I can replace letters ok, but not quotes.

  • December 20, 2022
  • 5 replies
  • 347 views

Hi, I'm trying to use the attribute manager to replace all instances of double quote marks " with single quote marks ' for the values of the attribute 'testo' @ReplaceRegularExpression(@Value(testo),",') I can replace letters ok, but not quotes.

Best answer by nielsgerrits

This works for me, in fme 2021.2:

@ReplaceString(@Value(testo),"\"",',caseSensitive=TRUE)

Please note that the field Attribute Value in the AttributeManager turns red, indicating something is off, but it does work fine.

2022-12-20_14h35_47

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+62
  • Best Answer
  • December 20, 2022

This works for me, in fme 2021.2:

@ReplaceString(@Value(testo),"\"",',caseSensitive=TRUE)

Please note that the field Attribute Value in the AttributeManager turns red, indicating something is off, but it does work fine.

2022-12-20_14h35_47


dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • December 20, 2022

This works for me, in fme 2021.2:

@ReplaceString(@Value(testo),"\"",',caseSensitive=TRUE)

Please note that the field Attribute Value in the AttributeManager turns red, indicating something is off, but it does work fine.

2022-12-20_14h35_47

@nielsgerrits​ Just curious, does 2021.2 make the attribute value parameter red with this input? It works in 2022.1 also, but it's red.image


nielsgerrits
VIP
Forum|alt.badge.img+62

@nielsgerrits​ Just curious, does 2021.2 make the attribute value parameter red with this input? It works in 2022.1 also, but it's red.image

Aye, it does. Looks like a glitch to me in the value validation. I'll create a ticket.


  • Author
  • December 20, 2022

@nielsgerrits​ thank you so much. i was trying so many different things. i don't think the red flagged parameter was helping my attempts because i was just modifying it each time i saw that.


danminneyatsaf
Safer
Forum|alt.badge.img+13

@nielsgerrits​ Just curious, does 2021.2 make the attribute value parameter red with this input? It works in 2022.1 also, but it's red.image

Looks like this is related to the quote (") character being present within a formula. This doesn't have an effect on the functionality of the workspace but we will try to resolve this as soon as possible. The ticket number for this is FMEDESKTOP-13584.

We will update this community post when a fix is released. Thanks all!