Posts

Showing posts from January 29, 2019

Clicking multiple buttons automatically with the addition of waitForKeyElements

Image
0 I've been searching for a way to automatically select survey form buttons that contain specific words across different websites. I am using Tampermonkey in Google Chrome to achieve this. In this case, I would like to automatically select buttons with the word 'Male' and 'Mr.' in them. Here is an example of the type of button I am talking about (including CSS/HTML): I am currently using the following code in Tampermonkey to achieve the pressing effect: // ==UserScript== // @name Male Test 3 // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://tasupport.co1.qualtrics.com/jfe/form/SV_0qez6NHJGoCAmMt // @match https://tasupport.co1.qualtrics.com/jfe2/form/SV_0qez6NHJGo

How to crop strings using regular expressions? [closed]

Image
-6 Here's the phrase I'd like to convert. Summoner1 joined the lobby. Summoner2 jonied the lobby. Summoner3: Top Summoner4: ADC I wanna pick up these words Summoner1, Summoner2, Summoner3, Summoner4 . I suppose I should detect the strings "joined the lobby" , and ": " using regular expression(regex) but I have no clue how to. Thank you in advance. Codes for extra question. var list = @"Summoner1 joined the lobby. Summoner2 jonied the lobby. Summoner3: Top Summoner4: ADC"; var result = string.Join("|", list.Select(x => Regex.Replace(x, "( |:).*", string.Empty))); c# regex share | improve this question