i need to control Only ExcelFile uploading with RegularExpressionValidator How can i do that? i need to write a regex pattern in ValidationExpression...
<h3>FileUpload Test</h3>
<div>
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:Button id="UploadBtn" Text="Upload File" OnClick="UploadBtn_Click" runat="ser...
I'm trying to learn reg exp,
i want to get title of <img only from the text
the text is differ and basically look like this
<a href="http://abcde.com" target="_blank"><img src="http://abcde.com/img/aa.jpg" title="img title" id="img id" class="img class" />
any guidance and advise are appreciated..
...
Hello, I want my urls.py to capture a long url setting as such:
/get/<lowercase_string>/<integer>/<date>/<date>/
For instance: www.mysite.com/get/ams/221/12-23-2010/01-10-2011/, as you may see date is in month/day/year format.
As my regex knowledge is near to nothing, I will be grateful for you guidance. I will be capturing <lowercas...
I have a CSV in this below format
11000,Christopher,Nolan,MR.,Inception,25993,France,"Lefoullon,Paris",920,Director,*461-7755,33-461-7755,12175,"O'Horner, James",12300,"Glebova, Nathalie",,[email protected],Capital,NEW
http://stackoverflow.com/questions/2241758/regarding-java-split-command-parsing-csv-file
In this link @Mar...
hi to all
i am using php and i am having problem to parse the href from anchor tag with text.
example: anchor tag having test http://www.test.com
like this <a href="http://www.test.com" title="test">http://www.test.com</a>
i want to match all text in anchor tag
thanks in advance.
...
hi,
I need a help with regex which checks the string contains only letter and numbers but not only numbers
Valid
* letters
* 1wret
* 0123chars
* chars0123
* cha2rs
Invalid
* 1324
* xcvxxc%$#
* xcv123xxc%$#
* _012chars
* _test
...
Hi
I have a form with jQuery.validate. It checks if typed email is correct using it's own method. What i would like to achieve is to use the regex from it with my server-side php input validation.
The regex i'm talking about:
/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.( [a-z]|\d|[!#\$%&'...
In Java there are a bunch of methods that all have to do with manipulating Strings.
The simplest example is the String.split("something") method.
Now the actual definition of many of those methods is that they all take a regular expression as their input parameter(s). Which makes then all very powerful building blocks.
Now there are tw...
I have a string like this:
" 23 PM"
I would like to remove 23 so I'm left with PM or (with space truncated) just PM.
Any suggestions?
Needs to be in PHP
...
Hi,
After viewing some answers on stackoverflow,
preg_match_all('/<img[^>]+>/i',$html, $result);
$img = array();
foreach( $result[0] as $img_tag)
{
preg_match_all('/(title)=("[^"]*")/i',$img_tag, $img[$img_tag]);
}
//print_r($img);
foreach ($img as $imgg)
echo $imgg[2][0];
The above code finds img title, but however it return a...
I have the following code in PHP:
if (preg_match('@^[a-z0-9/._-]+$@i', $script)
&& !preg_match('@([.][.])|([.]/)|(//)@', $script))
I'm making the assumption that the predicate for the if statement returns true for the string js/core.js.
How would I translate this to C#? The dumb translation is as follows:
if(Regex.IsMatch(...
Hello again, I have the following code with me, it produce the img title of specified text,
let say the title = waterfallfountainpicture20x20, how do i replace the word fountain with lagoon so it would become waterfalllagoonpicture20x20?
preg_match_all('/<img[^>]+>/i',$html, $result);
$img = array();
foreach( $result[0] as $img_tag)
{
...
Hello,
How can I use the negation within square brackets as an exception, to find e. g. everything between a-z except for the the range from m-o? [a-z^m-o]?
Thanks in advance!
By the way: it's not for the sake of this example that I ask, but to be able to exclude ranges within ranges, or even single letters within ranges. I am pretty ...
If I have the following data:
"test1"."test2" AND "test1"."test2"
What regex can I use to match "test1"."test2"?
I tried the following but it did not work.
\b"test1"."test2"(\s+|$)
In the given example I'd like to match "test1"."test2", and, "test1"."test2"
...
I'm working on a regex that could match the leading digits and . in a String. But it seems just not working correctly. The regex I'm using is
"^[\\.\\d]+"
Below is my code:
public void testMiscellaneous() throws Exception {
System.out.println("~~~~~~~~~~~~~~~~~~~testMiscellaneous~~~~~~~~~~~~~~~~~~~~");
String s1 = ".123 *[DP...
I am trying in Java to surround a word in HTML with some markup. This code throws a ArrayIndexOutOfBoundsException when the replaceAll is called.
Pattern pattern = Pattern.compile(wordToHighlight + "\\w{0,5}");
String replacement = "<span class='highlight'>$1</span>";
Matcher matcher = pattern.matcher(html);
if (matcher != null)
if...
I'm trying to hack about some sidebar code in a Wordpress template I'm developing. Basically I've captured what I need in an output buffer and I'm running regex over it to replace bits with the code I need. Problem is my regex knowledge is just a bit short on what I need to achieve.
The problem I'm having is as such:
$output = preg_rep...
In my project I work with text in general. I found that preprocessing can be very slow. So I would like to ask you if you know how to optimize my code. The flow is like this:
get HTML page -> (To plain text -> stemming -> remove stop words) -> further text processing
In brackets there are preprocessing steps. The application runs in ab...
This has probably been answered dozens of times, couldn't find the answer though...
Anyway, working in a Smalltalk environment I have a string composed of three parts like this: "ttm 4/6/97 00:08". The string is very variable, meaning some part may be missing (so it would be a string composed of less then three parts like "ttm 4/6/97") ...
I am using php and i want the part of the url without the /floor-plans/dsafasd
so i want
something/whatever
instead of
something/whatever/floor-plans/dsafasd
...