flag « global « Javascript Data Type Q&A

Home
Javascript Data Type Q&A
1.Array
2.Clojure
3.date
4.decimal
5.function
6.global
7.loop
8.math
9.number
10.object
11.Regular Expression
12.scope
13.String
14.Var
15.variable
Javascript Data Type Q&A » global » flag 

1. Why RegExp with global flag in Javascript give wrong results?    stackoverflow.com

What is the problem with this regular expression when I use the global flag and the case insensitive flag? Query is a user generated input. The result should be [true, true].

var ...

2. A problem with a javascript regex global flag    stackoverflow.com

Hey all, I've got the following regex:

var outstring = inputsplit.join(';').replace(/\s/g, '');
the problem is, given the array:
["this ", "is ", "a ", "test"]
the output is
"this;is ;a ;test"
instead of
"this;is;a;test"
any pointers on what I ...

3. Global Flag Variable    codingforums.com

Hello fellow coders, I'm new to Javascript and PHP and stuff like that, but I have experience programming in HTML, C++, and VB. What I'm trying to do: I'm creating a login system and have the following requirement. When the user is logged in, I want the their account information displayed at all times at the top of every page. When ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.