Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-1 votes
0 answers
15 views

Replacing a sentence that has citations in a DOCX file as Track Changes

I trying to replace a sentence instead of old one (which has citations) in a DOCX document using OpenXmlRegex.Replace method. The thing is creating the regex of old sentence and using it for replace ...
yacc_fridman's user avatar
-3 votes
0 answers
54 views

Getting text from a string [duplicate]

I am using this pattern below <a href=.*##ENCLICKTAG##2104.*\s*<\/a> To extract the first "a" tag content from this String below <a href="##ENCLICKTAG##2104&amp;&...
el bayames's user avatar
-2 votes
0 answers
31 views

Regex code to read out coordinates from a single line [duplicate]

I have a string from which I want to read the coordinates for the X axis. Here my String: G74X106.5Y-49.Z-22.6P1800Q51000F0.28R0.1 Here what i like to get: 106.5 In addition, the whole thing should ...
Patrick Gottberg's user avatar
-1 votes
2 answers
58 views

Add space after specified data using regular expression in Visual Studio

As we all know, Visual Studio has very powerful text editing functions. Now there are hundreds of thousands of data in my txt file. I made a wrong operation, which caused some problems with the data. ...
Wenbin Geng's user avatar
  • 3,443
0 votes
0 answers
102 views

Issue in masking AccountNumber and CreditCardNo in a free text field [duplicate]

Please re-open the question as scenarios mentioned below are different than the ones which are in linked question. I am awaiting answer from @bobble. I am having issue in masking the below strings. ...
user3665818's user avatar
2 votes
1 answer
70 views

Escaping special characters inside bat file won't act the same

I spend the entire day looking for a solution but without any success. I have a weird bug with a bat file created to unzip 7zip files with. Here is the .bat file: @echo off setlocal ...
Darius Man22's user avatar
0 votes
3 answers
159 views

Issue while masking Credit Card No. before and/or after spaces

I am having an issue when there is a space before/after in CreditCardNo. For example from INV 2420852290 to SAV 0165487. Here 2420852290 is 10-digits and still it is getting masked. For a CreditCardNo,...
user3665818's user avatar
1 vote
1 answer
52 views

Regex: split string into sets of chars from a pool

Is there a way to describe a regex splitting a string into sets of chars from a limited pool without duplications? For example we have pool of chars (A, B, and C), so string "AABABCCAB" gets ...
Dmitry Kurkin's user avatar
-2 votes
0 answers
37 views

Regex look behind with repeated characters [duplicate]

How can I put [\r\n\t]* into a regex look behind? If I have some text like: "My name is XXX" and I want to match the "XXX" but the between "is" and "XXX" ...
crookie's user avatar
  • 256
-1 votes
1 answer
80 views

Regex Match with the last pattern [duplicate]

Suppose I have a .txt file that needs to split using regex, and. So far, I've managed to split using my Regex Pattern. This is my .txt file: HMT940040324 SUBH2002078568 2002078568{1:F01BANK MBI}{2:...
Syafiqur Rahman's user avatar
0 votes
0 answers
24 views

Number next to a capturing group [duplicate]

This is my input: zone-1 zone-2 zone-3 I want to replace zone\-\d+ to: zone-5 This is my attempt: var zones = new string[] { "zone-1", "zone-2", "zone-3" };...
dafie's user avatar
  • 1,033
0 votes
1 answer
58 views

Regular expression to check for potential isograms C#

Suppose I need to write a method to look for non-repetetive characters (hyphens and whitespace characters are allowed to be met more than one time in an input): public static bool IsIsogram(string ...
Anthony Voronkov's user avatar
-1 votes
0 answers
29 views

How does C#'s named groups handle embedded groups [duplicate]

I have the following code, (note I am talking about c#/.net here since some of this is subtly different in other variants of regex): var str = @"abc(?<cg1>.*)def(?<cg2>((?<cg3>[...
Fraser Orr's user avatar
-1 votes
2 answers
44 views

Regex split where \# splits and \\# does not

I need to split some text but \\ means a single \ and \ is an indicator for a literal character. I have started with the following code but it is fooled by \\. so \# (# preceded by 0 or an even ...
user2903089's user avatar
0 votes
0 answers
34 views

How to Match HTML Fields with Specific Cases Using Regex in C#

I need help with creating a regex pattern in C# to match and extract fields from an HTML string that can be in one of three different cases: The field is empty. The field contains the info I need. ...
user25936958's user avatar

15 30 50 per page
1
2 3 4 5
1162