empty-string

Regular expression which matches a pattern, or is an empty string

I have the following Regular Expression which matches an email address format: ^[\w\.\-]+@([\w\-]+\.)+[a-zA-Z]+$ This is used for validation with a form using javascript. However, this is an optional field. Therefore how can I change this regex to match an email address format, or an empty string? From my limited regex knowledge, I t...

[C++] getline returning empty string

I'm having problems with the getline instruction from fstream. this is a snippet from my code: boolean_1=true; while(true) { if(boolean_1) { //some stuff } else { save_file.open("save.txt", fstream::in); //some stuff save_file.close(); } mission_file.open(filename, fstream::in); ...

strange behavior with 'IN' clause works

i found this site: here its very well described why it works and why not. but my question is a little different. select 'true' from dual where 'test' not in ('test2',''); why does this query not returing a row? is '' handled like null? thx for your help ...

Wasn't there a switch to toggle Oracles empty varchar2 - null behavior?

As everybody working with Oracle knows, it an empty Varchar2 will result in a NULL value when put into a Varchar2 column. I (and a coworker as well) thought we had read about a parameter that could be set in the database to change that behavior and actually differentiate between null values and empty Strings. Is there such a parameter ...

jQuery text() returns null in Google Chrome

Hello I'm studying a strange behavior in Google Chrome when using jQuery text function: $(document).ready(function () { $("#btnSubmit").click(function () { var t = $('#txtMessage').text(); alert(t); //this shows nothing in Google Chrome, but works in IE9 }); }); when I change var t = $('#txtMessage').text(); to va...