What's the best regular expression for integer separated by comma? It can also contain space between comma, and the field is not required which means it could be blank.
123,98549
43446
etc..
I built a slideshow/decision-making game in Flash but would like to try to redo it using jQuery.
The slideshow part seems simple enough, however I have a series of user decisions that I'm not sure how to approach.
In flash, if the user makes a decision, I would just store this in a variable or shared local objects, is this the same for jQuery? i.e. mix regular javascript variables with the jQuery?
I am wondering what this technique is called and what it does. It seems to be validating some regular expression on the variable url. I am customizing another persons code:
var url = document.getElementById("editorURL").value;
if(/(file|http).*/.test(url)) {
}
Maybe someone has a link to an article that explains this a bit more in-depth?
Hi, all.
I'm trying to convert an all-uppercase string in Ruby into a lower case one, but with each word's first character being upper case. Example:
convert "MY STRING HERE" to "My String Here".
I know I can use the .downcase method, but that would make everything lower case ("my string here"). I'm scanning all lines in a file and doing this change, so is there a regular expression I can use through ruby to achieve this?
Thanks!
Hi!
I have a workflow model.
Internet Explorer doesn't support some features required for model editing functionality
(and regular user doesn't need it).
I want a read-only preview of my model.
Is it possible to server-side render my html to image?
i will be printing the access report. the report will not be printed a regular white paper. it will be printed on top of a paper with checkboxes and fields on it. i need those checkboxes and fields to be printed on according to the access data.
are there any libraries for access that make this easier? is there a feature that will help to print on specific coordinates?
I tried to create a regular expression which catches all RFC-valid addresses but it's ok if some false-positives come through (though hopefully not so many). This is waht I came up so far:
/^\b\S+@\S+\.[^\s@]{2,}\b$/
Is there any RFC-valid address which doesn't match against this expression or do you have any suggestions to improve it? I don't mind the false positives but I would be glad if you show me a few, too.
I've got a string:
public://imageifarm/3600.jpg
How can I extract the
imageifarm/3600.jpg
Part out using android?
What I've tried so far:
URL drupalQuestionNodeImageURI = new URL("public://imageifarm/3600.jpg");
Log.d("TAG", drupalQuestionNodeImageURI.getPath());
but it throws this exception:
09-16 17:24:39.992: W/System.err(3763): java.net.MalformedURLException: Unknown protocol: public
How can I solve this?
I know I can use regular expressions but that seems to defeat the purpose of URL(URI) in this case.
How can I scale a set of values to fit a new range if they include negative numbers?
For example, I have a set of numbers (-10, -9, 1, 4, 10) which have to scaled to a range [0 1], such that -10 maps to 0, and 10 maps to 1.
The regular method for an arbitrary number 'x' would be:
(x - from_min) * (to_max - to_min) / (from_max - from_min) + to_min
but this does not work for negative numbers. Any help is appreciated. Thanks!!
I am working in VB.NET and I am familiar with working in the vb[design] view as well as regular vb. I am looking to view/edit my AP.CONFIG file how do I access this file? I am using Visual Studio 2008
To get a regular font: [NSFont fontWithName:@"Verdana" size:75];
To get a bold font: [NSFont fontWithName:@"Verdana-Bold" size:75];
To get an italic font: [NSFont fontWithName:@"Verdana-Italic" size:75];
To get a font that is bold and italic: ???
I want to develop a command line tool. I didn't build one before, but I used a few, (like mercurial). What steps do I need to take to know how to do that? So what is the problem:
Regular console application need to be invoked from the command line only from it's directory. Like: C:\Projects\CommanLineProject\MyProjectConsole.exe. I want to use it from the command line from any directory, like mercurial.
validates_format_of :email,
:with => /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" + @"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" + @".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)/,
:message => "is missing or invalid"
Please let me know where is the problem? Is regular expression is wrong?
I've got the following code.
sum_review = reduce(add,[book['rw'] for book in books])
sum_rating = reduce(add,[book['rg'] for book in books])
items = len(books)
avg_review = sum_review/items
avg_rating = sum_rating/items
What I'd like is this.
sum_review,sum_rating = reduce(add,([book['rw'],[book['rg']) for book in books])
items = len(books)
avg_review = sum_review/items
avg_rating = sum_rating/items
Obviously this doesn't work. How can I solve this redundancy, without a regular loop?
hi,
my window.location is "F:/html5/home.html", from my location i need to get the file name like this "home.html", to do this, how to i use the regular expression command?
any one help me?
I need a regular expression to validate the mobile number up to 9 digits, if the telephone number starts with 8 otherwise 10 digits needs to be entered.
Does it make sense to use UUID as primary key in MySQL?
What would be pros and cons of using UUID instead of regular INT, beside trouble of hand querying?
Our mail server is receiving a regular email addressed to a non-existing recipient at our domain, so it is being rejected.
Is there a way to see the contents of the email?
Hi,
with $("#TextInputElement").select()
I am able to select a text (mark it) in an in an input text field.
Now I only want to select the text in between brackets in that input field.
I have the regular expression match(/-[^-]*-/) to select, but how would I apply this to only select the text inside the input field between brackets?
[noselect]textToBeSelected[/noselect]
thx
I'm currently using regular expressions to search through RSS feeds to find if certain words and phrases are mentioned, and would then like to extract the text on either side of the match as well. For example:
String = "This is an example sentence, it is for demonstration only"
re.search("is", String)
I'd like to know where the is was found so that I can extract and output something like this:
1 match found: "This is an example sentence"
I know that it would be easy to do with splits, but I'd need to know what the index of first character of the match was in the string, which I don't know how to find
I'd like to see what a website is sending when I submit a form.
Using Firebug I can see that it is regular POST form.
I'm interested in the coding of the form fields.
Thanks in advance!
I have a plug-in that I am distributing via an Eclipse update site.
I want to track how many times it is being downloaded, and preferably by whom.
For regular pages on my site, I can use Google analytics. However, Eclipse doesn't use any HTMLs when going for update sites.
Is there any way to do this when I don't have access to the hosting apache?
I'm retrieving an unformatted String from a twitter feed. I want to be able to turn a text URL (http://blah.com/qwerty/) into a link but don't know how...is there a handy regular expression for this?
Hello
I want a regular expression which will ignore the sentence containing "XYZ" character.
I am using this but this is not working
"(.+[^XYZ])"
Thanks in advance
As I know, C inline function body should be defined in .h file.
Because it causes an error 'function-name used but never defined" if body defined in .c file.
Is this regular way? Or how to define inline function body in .c file?