rhettjevans's Recent Forum Activity

  • Ah you're right! I guess I shouldn't have assumed the quotes would become part of the string. Thanks!

  • I should have clarified: you're right that when I set up the Global variable the first time I can include a hashtag in the string, but when I try to use the "Set Value" action, I cannot change the global variable string to a string with a hashtag without putting quotes around it. See the image here.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I have a string Global Variable called help_url that looks like this "https://www.example.com/site#1" (the exact site URL changes during gameplay). Construct forces me to put double quotes around it since it has a # character.

    Users are supposed to be able to click on a UI button and then it takes them to the help_url in a new window. Now I am setting up the Browser action for when a user clicks on the button, which means I have to strip out those double quotes, so I'm trying to use:

    RegexReplace(help_url,"/["']/","","")

    But Construct rejects this because it wants me to close the double quoted string in the REPLACE spot. I'm not great at REGEX, but I've also tried approaching from a different angle with my URL using

    RegexMatchAt(help_url, "/[a-zA-Z0-9]*-[a-zA-Z0-9]*/", "", 0)

    But that doesn't work either (the page opens to about:blank). Can anyone tell me what I'm doing wrong or suggest a better way?

rhettjevans's avatar

rhettjevans

Member since 29 Jan, 2019

None one is following rhettjevans yet!

Trophy Case

  • 5-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

8/44
How to earn trophies