All Questions
17,419
questions
-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 ...
-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&&...
-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 ...
-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.
...
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. ...
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 ...
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,...
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 ...
-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" ...
-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:...
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"
};...
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 ...
-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>[...
-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 ...
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.
...