-2
votes
1answer
43 views

Regular expression syntax in javascript [closed]

Hi I am new to Regular expression but have learned some basic. I was going through the code ,there I found a very complex regular expression. I tried to understand it but couldn't found the main idea ...
0
votes
1answer
25 views

regedx working on a gloabl scale where 2 or more results shoud return

I am trying to find certain results (could be more than 1) and then process these, having issues with the /g. doesnt seem to want to return multiple results I have the following code <div ...
1
vote
1answer
23 views

Regex to extract word from a line

I am trying to extract the word(s) inside round brackets. Code: $('.vote').each(function() { var vote_count = $('.vote .likedButton').attr('title'); var split_count = ...
-2
votes
1answer
23 views

How to match a substring surrounded by known prefix and suffix in javascript

Given a string, such as: example string with an intended nested string to match. How to isolate a substring knowing only a prefix and suffix for it, e.g. between intended and to match?
0
votes
2answers
23 views

Conflict with understanding a Javascript regular expression

There is a Javascript regular expression that I am working with, but that is conflicting with my understanding of how it works. The expression is this: /^[0-9]+$/ So, if I test this regular ...
0
votes
2answers
39 views

JavaScript regex form validation failing

I made this random number guessing game using PHP, and I'm trying to implement client-side form validation using JavaScript. The script should allow only a number from 1-100 and reject everything else ...
-6
votes
2answers
47 views

What is the meaning of this regular expression in java script

What is the meaning of this expression. Unable to understand ? function escapeRegExp(string){ return string.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1"); }
6
votes
4answers
106 views

What does this `/^.*$/` regex match?

I'm maintaining some old code when I reached a headscratcher. I am confused by this regex pattern: /^.*$/ (as supplied as an argument in textFieldValidation(this,'true',/^.*$/,'',''). I interpret ...
0
votes
2answers
52 views

Regular expression X characters long, alphanumeric but not _ and periods, but not at beginning or end

As the subject indicates, I am in need of a JavaScript Regular expression X characters long, that accepts alphanumeric characters, but not the underscore character, and also accepts periods, but not ...
-1
votes
1answer
58 views

Javascript regular expression - match */

I am trying to write a tool whereby you enter incorrectly formatted CSS into one text area, hit submit and it runs a few regular expressions and feeds back the minified and "maxified" CSS in 2 other ...
3
votes
4answers
59 views

Javascript - Regex : How to replace id in string with the same id plus number?

I have a string with multiple elements with id's like below: var data = "<div id='1'></div><input type='text' id='2'/>"; Now I'm using this regex to find all the id's in the ...
-1
votes
0answers
34 views

Javascript regex for determine flash

I try to define swf files on page for loading and use next regex if (e.match(/\b.swf\b/i)) { return "flash" } And I don't understand why e = 'flash/myFlash.swf' not satisfy this condition
0
votes
2answers
25 views

Javascript regex to match fully qualified domain name, without protocol, optional subdomain

I haven't been able to find this one and what I'm trying isn't quite working out for me. I want to match only domains that: don't contain a protocol (http, https, ftp) optionally include a ...
0
votes
1answer
64 views

Find all words that start with @ sign

I have the following Javascript function that finds all matches of a set of words inside a contenteditable div: var words = ['oele', 'geel', 'politie', 'foo bar']; function markWords() { var ...
0
votes
3answers
48 views

Regx for Date Validation in javascript

pls can somebody give the date validation regx, which will allow the following rules are It should allow mm/dd/yyyy, m/d/yyyy, mm/d/yyyy, m/d/yyyy (not allow yy) Number of days for month (30 and ...

1 2 3 4 5 503
15 30 50 per page