Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / How to Search a String for Quotation Mark?

Author
Message
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 19th Dec 2016 16:04 Edited at: 19th Dec 2016 16:08
Hello everybody.
I was using some commands to find strings based on what they contained.
For example, I was able to find the word 'play' from the phrase 'iwanttoplay' by using
Quote: "FIND SUB STRING$(source, string)"

We put in the source string in quotation mark "iwanttoplay" to be used in that command.

My question is, how do we search for a string if the string itself contain a quotation mark?
Because I need to enclose that string in quotation mark "string" for it to be searched. But if the string already have quotation mark inside it, then I cannot enclose it in quotation marks to represent it as string.
For example, I have this string:
Quote: "<a href="http://fandom.wikia.com/explore" class="wds-global-navigation__dropdown-link" data-tracking-label="link.explore">"

And I want to search for this string:
Quote: "href="http://"


The problem is, I can't put that string in the command because that string already have quotation marks " in it.
So if I put the string inside the command, it would look like this:
Quote: ""href="http://"

That would not work, because there are quotation mark inside the string.

So, how do we search for a string if the string already have quotation marks in it?
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 19th Dec 2016 16:47
I found a way. We can search the ASCII character instead.
So, this string
href="https://
will be searchable using this
"href="+ CHR$(34) +"https://"

Login to post a reply

Server time is: 2024-04-24 19:22:03
Your offset time is: 2024-04-24 19:22:03