to allow space in regular expression [closed] - regex

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 11 years ago.
[a-zA-Z0-9-_]{3,} this is my currently using regular expression in login page. I would like to allow space in the regexp. How can i do it? I'm lack of knowledge in RegExp.

This is just a character class, so just add space at the end of the class: [a-zA-Z0-9_ -]{3,}

How about:
[a-zA-Z0-9-_\s]{3,}
This will allow all forms of whitespace...

Related

Regex matching phone numbers [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
Can someone help me out here? I need a regex that will match the following pattern:
10-(any 5 digits except 73480)-(any 4 digits)
Examples
valid: 10-12345-1234
invalid: 10-73480-1234
Thanks
You should use negative lookahead to check for any occurance of 10-73480 before matching..
^(?!10-73480)10-\d{5}-\d{4}$
Try it here

meaning of this regular expression /(\+\d{2})/ [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
Can anyone tell me meaning or possible values of below regular expression?
/(\+\d{2})/
Plus followed by a number on 2 digits.
This matches for instance: +23
A + followed by 2 digits: +23 +01 etc.

Regex to check entry [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I am absolutely terrible at regex and need to know how to determine if a value in a select is either 1 or 2, and not 0.
There are three options and only 2 are valid.
This is to be used as the validation regex for the jQuery validationEngine plugin.
Thanks in advance.
If you mean to match the literal strings "1" and "2",
/^[12]$/
will suffice.
The easiest way is to probably just check with ==, but if you really want to use regex:
var regex = /^[12]$/;

REPLACE in ColdFusion without losing characters [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I have a string and I want to use replace() to remove some characters without losing character value, including spacing.
Here is an example:
Extremely Dissatisfied_______________________________________Extremely Satisfied
I want to use replace on this string:
<cfoutput>
#REPLACE("#attributes.question.questionsub#","_","","ALL")#
</cfoutput>
To get something like
Extremely Dissatisfied Extremely Satisfied
but instead I am getting this:
Extremely DissatisfiedExtremely Satisfied
I found the answer:
<cfoutput>
#REPLACE("#attributes.question.questionsub#","_"," ","ALL")#
</cfoutput>

Unicode support in Java SE7: missing classes for Unicode scripts? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I'm trying to capture Arabic text using the java regular expression \\p{IsArabic}, however the java compiler does not seem to recognize it, even though the documentation for java SE7 says it does.
I am pretty sure I'm using the correct compiler (JDK 1.7). In fact, the compiler is not recognizing any of the script classes, such as \\p{IsLatin} and \\p{IsGreek} ! Is anyone else having the same problem?