Yes, it can be done from Find and Replace in two steps. Find: __\w+?\(" Replace: " Find: "\) Replace: "
moxol
Posts
-
remove parenthese from function like string -
remove parenthese from function like stringRegex that I gave you will work whatever the string inside parentheses is. It focuses on removing the __X(" and "). You can use this one for any __X
string newExp = Regex.Replace(Regex.Replace(oldExp, @"__\w+?\(""", @""""), @"""\)", @"""");
-
remove parenthese from function like stringDoes this simple Regex.Replace work for you?
string oldExp = @"__X(""(whatever1)"") alpha __X(""whatever2"") beta";
string newExp = Regex.Replace(Regex.Replace(oldExp, @"__X\(""", @""""), @"""\)", @""""); -
Last occurence of a wordI have this text:
[18F-FMISO](https://www.sukl.eu/modules/medication/detail.php?kod=0242816 "Detail of medicinal product 18F-FMISO, 1-8GBQ INJ SOL 1GBQ")
I need REGEX that will return word between the last occurence of the </span> and </a>. That word in this case would be 18F-FMISO. How to do that?
-
Async web requestI have this simple async web request code:
class AsyncResponse
{
public AsyncResponse()
{
test2();
Console.ReadKey();
}public void test2() { for (int i = 0; i < 100; i++) { string url = "https//www.google.com"; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.BeginGetResponse(new AsyncCallback(FinishWebRequest), request); } } private void FinishWebRequest(IAsyncResult result) { HttpWebResponse response = (result.AsyncState as HttpWebRequest).EndGetResponse(result) as HttpWebResponse; Console.WriteLine("Finished"); }
}
I only got on console two "Finished" lines, meaning FinishWebRequest didn't get finished more then 2 times, but I have 100 requests. What is the issue?
-
Regex before matchYes, I think
\w*bad boys\w*
will do it. It's MySQL Regex expression, and it seems that it works for both Latin and non-Latin characters.
-
Regex before matchI can't place [A-Za-z] since there will be also a non-Latin characters. It has to be .+
-
Regex before matchIf I have string
1213 494 4 toobad boys 1234 4444
I want to match "bad boys" and everything before and after bad boys until word boundary \b. Something like this
"\\b.+?bad boys.+?\\b"
This returns
1213 494 4 toobad boys
and I want it to match "toobad boys" I know that the problem is "\\b.+?bad" which matches everything up to "bad boys", but instead it has to match everything before "bad boys" until word boundary \b. Help?
-
TLS 1.3 on Windows VistaVista is on customer's computer, I can't change that. I managed to install TLS 1.1 and TLS 1.2 using this guide Enable TLS 1.1/1.2 on Windows Vista | JohnHaller.com[^] but no TLS 1.3. I found a method to install .NET framework 4.8 on Vista, but not yet tried. Then it would be possible to use in app TLS 1.3. [Tutorial] How to install .Net Framework 4.8 on Windows Vista - Windows Vista - MSFN[^] If that doesn't work, only remaining option is to use third-party library like libcurl as suggested.
-
TLS 1.3 on Windows VistaI have a C# app in .NET framework 4.6.1 where it uses WebClient.DownloadString(url) to download content from a url that uses TLS 1.3 and it throws exception because app is intended for a use on Windows Vista that doesn't have TLS 1.3 .NET framework 4.8 can't be installed on Vista. How can I solve this problem so that app can work on Vista?