Can someone help me with my issue in removing first character ' from the data in informatica.I tried using LTRIM it didnt work, as the trimset was ' ,not sure how this will go with the quotes. I mean a quotes within quotes. Please advise which can help me remove the first character ' from the data.
I guess some more information might be needed. Where is the quote coming from? Is it in the input data or showing up in the header?
If it is the first case, you may try to follow up this guide and use below formula:
REPLACECHR (1, INPUT, CHR(39), NULL )
Related
I'm honestly a novice on scilab.
I'm using print function to create .txt file with my character matrix in it.
But , when I open txt file, double quote appeared. I just want words without "".
This is how I'm using print
Compterendu(1,1)= "Medecin demandeur: "
fileresname= fullfile(RES_PATH, "compterendu.txt")
print(fileresname,Compterendu)
And, compterendu.txt was printed out like this.
Would be so grateful for any help!!
Thanks
Why do you use "print" ? After looking into the doc, yes, it is used to produce the same text as when you type the expression or the variable name on the command line. Hence it does print double quotes for strings. If you need something more basic use lower level i/o commands, like mputl.
S.
How to extract data without quotes in iMacros? The following code can remove comma, but still give me quotes sign.
SET !VAR6 EVAL("var s='{{!EXTRACT}}'; s.replace(',', '');")
I am using FF broser. Thanks in advance.
You want to remove ' from your text together with the ,? Your code keeps the quotes, because you don't do anything to replace them. You can use
SET !VAR6 EVAL("var s='{{!EXTRACT}}'; s.replace(/[,']/g, '');")
to replace every occurence of either character. Read up on regular expressions and on replace to tweak this if it's not precisely what you want.
I am trying to insert a space before the capital letters in oracle. I thought it would be easy using a regexp_replace, but I can't seem to get a proper back reference to the character I am replacing.
select trim(regexp_replace ('FreddyFox', '[A-Z]', ' \1' )) from dual;
Result: '\1reddy \1ox'
I have tried multiple variants of a back reference but I can't seem to find something that satisfies Oracle.
I did look at multiple SO answers but I could not figure out what is wrong.
e.g. regexp_replace: insert a space in a string if not already present
TRIM(regexp_replace ('FreddyFox', '([A-Z])', ' \1' ))
TRIM enables you to trim leading or trailing characters (or both) from a character string. If trim_character or trim_source is a character literal, then you must enclose it in single quotes. Default is both.
regexp_replace ('FreddyFox', '^([A-Z])', ' \1')
How can I escape an apostrophe in golang?
I have a string
s = "I've this book"
and I want to make it
s = "I\'ve this book"
How to achieve this?
Thanks in advance.
Escaping a character is only necessary if it can be interpreted in two or more ways. The apostrophe in your string can only be interpreted as an apostrophe, escaping is therefore not necessary as such. This is probably why you see the error message unknown escape sequence: '.
If you need to escape the apostrophe because it is inserted into a database, first consider using library functions for escaping or inserting data directly. Correct escaping has been the culprit of many security problems in the last decades. You will almost certainly do it wrong.
Having said that, you have to escape \ to do what you want (click to play):
fmt.Println("\\'") # outputs \'
As you're using cassandra, you can use packages like gocql which provide you with parametrized queries:
session.Query(`INSERT INTO sometable (text) VALUES (?)`, "'escaping'").Exec();
I am getting a Varchar2 variable with leading and trailing single quotes but I want to remove these single quotes, I am doing it like
trim(BOTH '''' FROM lastname);
It is giving me right result but is it a right way or is there any other way to do that.
Thanks in advance.
I think you can't get any better than what you already proposed. So yes, this is the right way.
Using BOTH is not necessary as it is the default (as oppposed to the also valid leading and trailing specifiers). So, depending to your preferences (short vs clear) you might leave it out, so that your statement becomes
trim('''' from lastname)