Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Can anybody provide me regular expression for multiple of 100.
we want to validate value in multiple of 100 .
Regards,
Pradeep
I'd use this:
^[1-9]+[0-9]*00$
First number must be from 1 to 9, then any number of random digits, and it must end in two 0's.
In future looking up a bit of regex would be a good first step, this is very very simple and can be worked out (even by a complete novice) in very little time.
what about this
([0-9]*00)|0
you can check above expression here
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed last month.
Improve this question
This is the same question as this. But since I'm not using javascript, 'innerText' is not a solution for me and I was wondering if it was possible for regex to combine /(<.*?>)/g and /\S+/g to get the actual word count without having to make a bunch of string operations.
The language I'm using here is Dart, if a solution I haven't found already exist within it that would work too as an answer. Thanks !
Edit : Someone edited the tags ? This question is not Dart-specific and is about regex, so I'm putting them back as they were.
Edit 2 : The question was closed because it is not "focused", but I do not know how I can make "if it was possible for regex to combine /(<.*?>)/g and /\S+/g" any more focused.
Assuming all text is enclosed in HTML elements, you can use (?<=>|\s)[^<\s>='"]+?(?=<|\s).
With the string <p>One</p><p>Two Three, Four. Five</p><p>Six</p> there are six matches.
Note:
It uses a lookbehind group, which might not be supported in all browsers.
Punctuation at the end of words are grouped with them, e.g. "three," so keep that in mind if you're planning to use the actual words and not just count them.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have date written like this : 01/12/2013 -- how can I display only the first two letter using REGEXP. Thanks
You could use SUBSTRING_INDEX function instead of a regexp:
SELECT SUBSTRING_INDEX(column, '/', 1)
FROM yourtable
You can also use LEFT function
SELECT LEFT(datecol,2) FROM `table`
Demo
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I was in need of an input of type time where users need to enter 'from' and 'to' times and I found this
<input type="time">
but it won't work in firefox , ie etc.. ( as you all know)
So is there any way to implement something similar to this in my time input field where user can select time ( hour: min :AM/PM)
I am a newbie ( with my first website) and this is my first question here.. pls consider
thank you
Try jquery time picker, i always this one
http://pttimeselect.sourceforge.net/example/index.html
If you want something very simple then try
http://keith-wood.name/timeEntry.html
this one is similar to <input type="time">
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have two different HTML layouts. I have created an if statement and depending on the circumstance, I would like to extend one of the two HTML layouts. I am not sure if this is possible or not. This is what I want to do:
- if validlink
- extends "layouts/successful.html"
- else
- extends "layouts/unsuccessful.html"
I think that it's better if you change the perspective. If you design two different div, each one with he content of the HTML that you have and then, when you do the if statement, you show the one that you need.
EX:
if (validlink)
document.getElementById(ID_OF_DIV).style.visibility="visible";
else
document.getElementById(ID_OF_DIV).style.visibility="hidden";
You can call it with a function or whatever you want. its really easy. It's a function of javascript. HTML/PHP+CSS+JAVASCRIPT is powerful.
Simply and easy in my opinion.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need help in updating my database,
I have a column named 'questionLink' in table 'question'
which contains names of the images, (image1.jpg, image2.jpg, image3.jpg)
there are 100s of images, and i have to remane with .png extension...
I firstly trying to show the records with this query, which is no way near to the solution.
SELECT * FROM question WHERE "questionLink" LIKE '%.jpg%'
Any help will be appriciated.
Thanks
Are you looking for something like this?
UPDATE question
SET questionLink = REPLACE(questionLink, '.jpg', '.png');
Here is SQLFiddle demo
Further reading REPLACE()