Quantcast
Channel: CodeProject Latest postings for Regular Expressions
Browsing all 224 articles
Browse latest View live

Help wanted with regex format.

Given an input string like this: Some text containing % complete and not much else If I use a regex of \bcomplete\b I can find the whole word complete just fine. What I want to do is find % complete....

View Article


Matching a string.

Given this input pattern \[.+" and this string w2rddddd["oQookkkkkk"]rrrrrrrrrrr the pattern returns w2rddddd["oQookkkkkk"]rrrrrrrrrrr, that is, up to and including the second double-quote. What I'd...

View Article


Parsing a string with match groups

Let me start by saying that I'm not the greatest with Regular Expressions, but from research it seems that they are the best way to go for what I need; I just don't fully understand how to use them...

View Article

Parsing ASCII-Only string

Yess, I am still struggling with RegEx.  What I have done so far is to validate a string whether it consists of printable ASCII chars only. ///<summary>/// The name of the host which has...

View Article

MATLAB Code

i want to separate voice and background music from an audio file, for this i have use BSS method. Can any one provide me MATLAB code for BSS(blind source separation)

View Article


[Solved]

Me again. RegEx again. Problem: I need to parse a string which consists out of Key-Value pairs. Keys are separated from values by a "=". Values can contain a "=", but they must be escaped as "\="....

View Article

Regex to extact lines of code know the start and ending

Hi  I would like to extract below data from a file from Stack to "}" , Is the pattern suppose to be like "^Stack #1: ( . ) $}"  Eg Line : Ques xx dd  Stack #1:  Task id #330  TaskRecord{ccsssew fs...

View Article

Regular expression date

How to convert "Jan DD" to "DD/01" where D is any digit from 0 to 9 (e.g.: Jan 15>15/01)

View Article


Help with regex HTML form validation

Hi,  I created an HTA that requires First Name, Last Name, and username to be entered. I am working on the First Name validation first.  The First Name should only be alpha characters but may include a...

View Article


Help with regex HTML form validation Part 2

Hi,  Now I need a pattern to detect last name possibilities. I think this pattern will be slightly more complicated. Names that I see in the database are like:  Jones Jones-Smith Jones Smith (no...

View Article

negation of an expression

i thought it would be simpler, however i wasnt able to get regular expression for the below.   i want to extract the words which are not in a particular pattern.   say in the below sentence  clicking...

View Article

Using back references to find data type naming standards violations

Hello,Using Visual Studio 2015, the first following line RegEx finds the second following line Dim statement:Dim L_V_Scalar_(Integer)_Item As \1Dim L_V_Scalar_Integer_Item As IntegerIs there a way to...

View Article

Extract tag within pre tag

Hi, I'm going nuts. I've got heaps of html-pages, that have to be adjusted, since there are "a href" tags within "pre" "/pre" code, that have to be removed. Some code like...

View Article


Regex getting special caracter

I have a string like:string s1 = "dog().Cat(\"Happy\")";I want to:1) count the number of round brackets '(', I expect as result 22) get the text inside, I expect "\"Happy"\", which appear in console...

View Article

part of string before a match

I have a path and I want to get the part of a path before my match:string s1= @"c:\temp\lev1\lev2\lev3\MYWORD\lev5\lev6";string mtch ="MYWORD"knowing s1 and mtch I want to get the part of path before...

View Article


how to make a white space regex

siri am doing a project, i want to match a string with regex which will match the whole string and it dosent allow two white spaces concerrently on after the other and also it dosent allow white spaces...

View Article

Advanced practice on regexp

Hi there, I've just read the great "30 Minute Regex Tutorial", by Jim Hollenhorst. A brilliant piece of writing. Congratulations, Jim. Expresso is also a really superb tool.I would need to go deeper...

View Article


My co-worker came up with a regex that validate dates... and it even...

please, tell me this has a bug:...

View Article

Regular Expression to allow combination of character with digits only

I want Regular Expression or any other validation for textbox to allow combination of character with digits only.. which can not be allow only digits or only character.

View Article

Help wanted with regex format.

Given an input string like this:Some text containing % complete and not much elseIf I use a regex of \bcomplete\b I can find the whole word complete just fine. What I want to do is find % complete....

View Article
Browsing all 224 articles
Browse latest View live