Skip to content Skip to sidebar Skip to footer
Showing posts with the label Regex

Javascript Regex To Allow Only 2 Digit Numbers And 3 Digit Numbers As Comma Separated

I want Regex for Javascript for below validation: Textbox should allow only 2 digit numbers and 3 d… Read more Javascript Regex To Allow Only 2 Digit Numbers And 3 Digit Numbers As Comma Separated

How Do I Resolve An "invalid Quantifier" Error With Regexp In Javascript?

I'm trying to transfer the following URL validation function from my PHP code to my javascript … Read more How Do I Resolve An "invalid Quantifier" Error With Regexp In Javascript?

Allow Aphricates In This Regex

We're using this regular expression to allow text only in input fields: /^[a-zA-Z-,]+(\s{0,1}[a… Read more Allow Aphricates In This Regex

How To Escape Asterisk In Regexp?

I want to use the pattern *1*. I have tried \*1\*, but it doesn't work. Where is the problem? S… Read more How To Escape Asterisk In Regexp?

Global Matches Using Javascript Regular Expressions

Usually when you do something like 'test'.match(/(e)/) you would receive an array ['e&#… Read more Global Matches Using Javascript Regular Expressions

Regex For A Particular Date Format

I want to have a regex for a date format, Example: 01-Jan-2011 I have written ^[0-9]{1,2}-[a-zA-Z]{… Read more Regex For A Particular Date Format

Validation Based On A Regular Expression Only On Submit

I use a regular expression to validate a price, but the error message appears before I finish to in… Read more Validation Based On A Regular Expression Only On Submit

Javascript Regexp Cant Use Twice?

I have a very strage problem: var cat = [ { slug: 'test/foo', id: 1}, { slug: 'test/bar… Read more Javascript Regexp Cant Use Twice?

How Do You Match Valid Integers And Roman Numerals With A Regular Expression?

There is a very helpful article on how to validate roman numerals How do you match only valid roman… Read more How Do You Match Valid Integers And Roman Numerals With A Regular Expression?

Getting The First Word In A Tag With Regex

I'm trying to make a regex to get the first word in a tag. I already have one to get all the w… Read more Getting The First Word In A Tag With Regex

How To Search Regex Only Outside Curly Brackets

I have this regex variable: var regexp = new RegExp(RegExp.quote(myExpression) + '\\b', … Read more How To Search Regex Only Outside Curly Brackets

Regex On Chrome Pattern Input Validation

I have an RFC 5322 compliant email regex pattern to validate my input. This works in all browsers, … Read more Regex On Chrome Pattern Input Validation

Javascript Regex: How To Find Index Of Each Subexpression?

Suppose I have the string: BLAH BLAH BLAH copy 2. I want to find the index of the two pieces, the w… Read more Javascript Regex: How To Find Index Of Each Subexpression?

Regex To Find Word On Page Including Inside Tags

Thanks to Chetan Sastry I have this Regex code to parse my page for a list of words and add the TM … Read more Regex To Find Word On Page Including Inside Tags

Limiting Input To Specified Regexp With Uppercase Chars In Ie

I'm trying to limit what our users will be able to type in inputs, using javascript/jquery. Pro… Read more Limiting Input To Specified Regexp With Uppercase Chars In Ie

Regex To Wrap Strings With Html Tags

I have a textarea with lots of lines that look like: #1=stuff #2=more stuff ... #123=even more stuf… Read more Regex To Wrap Strings With Html Tags

Mm/dd/yyyy Hh:mm:ss Am/pm Date Validation Regular Expression In Javascript

I am trying to validate a date in format MM/DD/YYYY HH:MM:SS AM/PM in javascript. I am unable to … Read more Mm/dd/yyyy Hh:mm:ss Am/pm Date Validation Regular Expression In Javascript

How To Ignore Spaces Only For Dynamic Content While Forming An Regular Expression To Compare Two Sentences?

I have a sentence, and I need to compare it with customer send message and return whether it has be… Read more How To Ignore Spaces Only For Dynamic Content While Forming An Regular Expression To Compare Two Sentences?

Regular Expression To Match At Least Two Special Characters In Any Order

I have to do jQuery form validation for password. The password should contain at least two special… Read more Regular Expression To Match At Least Two Special Characters In Any Order

Why Doesn't String#match() Result Contain Captured Values?

I am trying to extract a value from simplest JSON in javascript. After searching i found match to b… Read more Why Doesn't String#match() Result Contain Captured Values?