Como eliminar comillas de una cadena - Forum

Forum Navigation
You need to log in to create posts and topics.

Como eliminar comillas de una cadena

Buenos dias, tengo un problema estoy intentando eliminar unas " de una cadena que obtengo de una URL... el problema es el siguiente:

StrReplace no comprende la comilla dentro del caracter a remplazar he intentado tambien poniendo su caracter en ASCII tal y como se hacia en NEOBOOK pero tampoco lo comprende.

Cual seria la forma de hacerlo.

StrReplace "[url]" "[#34]" " ." [url1] ""

 

 

 

 

fkapnist has reacted to this post.
fkapnist

Hi @jomego, have you tried with StrReplace '[url]' '"' ' .' [url1] "" 

Quote from jomego on March 6, 2023, 1:41 pm

Good morning, I have a problem I'm trying to remove some " from a string I get from a URL... The problem is as follows:

StrReplace does not understand the quotation mark inside the character to be replaced I have also tried to put its character in ASCII as it was done in NEOBOOK but it does not understand it either.

What would be the way to do it.

It would help if you posted the actual string,
but this might work for..    /thisisa"quote/helloworld/

StrReplace "/thisisa[#34]quote/helloworld/" "[#34]" """ "[url1]" "CaseSensitive"

.

@jemsnixon are you talking about VisualNEO Win or VisualNEO Web?

In VisualNEO Win it works exactly the same as in NeoBook.
In VisualNEO Web there are not predefined variables with special characters but you can use UnicodeToChar command.

Please take a look at this thread:
[SOLVED] Syntax Error with neoEditSetHtml - Forum - VisualNEO. Cross-platform App Development Tool for Windows

@jomego

Another way would be to have a javascript subroutine do it; I created jsReplaceDoubleQuotes with this code ...

const str = 'abcd"1234';
const replaced = str.replaceAll('"', replaceText);
alert(replaced);

... and invoked it with this command ...

jsReplaceDoubleQuotes "qwerty"

This subroutine can be enhanced with parameters for ...

a) the variable containing the sourceText (although creating a variable with DoubleQuotes internally for testing would be a challenge)

b) the variable to contain the resultingText