269 Topics
|
|
Hi all, I wanna extract a certain link from a web page using python regular expression. The scenario is like this.. The code: blah... ... .... <div class="test" src="[B][url]http://www.test.com/file.ext[/url][/B]" style="top:0px;width:100%;" .... blah blah blah I wanna extract the url "http://www.test.com/file.ext" from the page using python regular expression. Thanks in advance! |
|
Im a completely retarded person when it comes to creating regex patterns! I want to check a users input, and allow certain urls, so here I have half of a pattern I have put together - Well it is actually the whole bit, but im missing bits and parts to … |
|
[B]Background:[/B] An application that opens a file, searches the file for the old password, replace the old password, and then saves an closes the file. The file is used by another process. [B]Servers [/B] I have two environments one for dev and prd. [B]The Issue[/B] * On prod the files … |
|
I have clients who send email messages to a specific e-mail address, and i have a script that will automatically update the MySQL table with that data from that e-mail and will publish it to a web page. Images inserted into the emails cannot be seen on a web browser, … |
|
Hello Guyz, I could not found any Forum for Web Servers or something related to my problem so I am posting it here. So I am having trouble with Regular Expressions in HTACCESS. So what I have in my website is : [B]ROOT : (my web root is in a … |
|
Hi, im making my new CakePHP project and I've got some problems with validating data, which comes from form. I mean i do know how to add custom rule but i don't know how should regex for 9 numeral telephone number looks like. [code] function checkPolishNumber($inputValue){ $regex = 'what to … |
|
Hello... I'm working on a program that gets some info about a certain web page. But one of the features is it needs to find all the links to other webpages on THE SAME site (I think its called an internal link... not sure). I already figured out how to … |
|
Hello, I'm new to the whole regex thing, and I'm having trouble understanding the syntax. I have to separate a line by different criteria like spaces, brackets and others. Here's and example line: "$#*! My Dad Says" (2010) {Code Ed (#1.4)} 2010 What I want to have is: $#*! My … |
|
Well is there any built-in function to do this ?, or 3rd party library EXAMPLE code [CODE]source := Sock.Get('http://www.google.com/'); if source('Google Search Engine', a) > 0 then begin NeededPattern := GetPattern(source, '<font>','</font>'); result := neededPattern; // will display ABC of the <font>ABC</font> end;[/CODE] Then it will get the middle of … |
|
Hi all here is my problem, I have a text area in html page containing a long html code. like [CODE]some code ..... ....... <input type="text" name="mobile" value="1234567890"/> some code ..... .......some code ..... .......[/CODE] From that code present in the <textarea> i need to extract following line <input type="text" … |
|
Hi, I need to concatanate lines based on regex. Lines to be concatanated are scattered. All lines begin with number$number$number$number$sentences. There is nothing to mark the end of sentence, only the beginning. Here is an example. I want to rewrite this one [CODE]2 $5$233$ check big cat if it have … |
|
Hi I have a String as "ABC("zscxfdb") OR DEF("ghg5dfg5") OR GHI("sdghrhrhr"). I should take the String present inside DEF() alone.. Can anyone help me in this.. Thanks in advance... |
|
Dear Friends, [CODE]<a href="javascript:void(0)" onclick="javascript:chatWith('babydoe')">Chat With Baby Doe</a>[/CODE] Please convert this into regular php expression please. Thanks in advance |
|
I am trying to clean up some text that has some white space that I can't seem to get rid of. I have tried replacing \s, \t,\n, \r, \r\n etc. and that strips out most of the new lines but not all. When I look at in a text editor … |
|
Hi guys, I would like to validate some form input, and only allow the folowing: letters, numbers, /, - if(!preg_match("*[0-9A-Za-z,-,/]", $url_key)){ $erros[1] = '<small>Error submitting url key!</small>'; } Which is not working.. Its not the point only to allow one / or - But only letters, numbers and /- in … |
|
Hello dear community, I have a problem which I have no idea how to walk around, see I have a really large database, with france zip codes, I imported this data from excel. the thing is that when it imported all the zip codes starting by 0 are not starting … |
|
I am writing a Java program, and I need to be able to call these two methods, but I'm kind of confused. These methods need to be able to match the following data: This would be a sample input if what I am checking... LASTNAME "Rosemont" # LASTNAME "Rose Mont" … |
|
Hi, How can I use preg_replace to determine if a string contains a word beginning with a pattern, and if it does, remove it? Basically I want to capture query strings from a search, but throw away search modifiers. For example, the search query string: site:daniweb.com query would just become … |
|
I have a data store having a Note field (a textarea) and want to display all Notes satisfying a user input (even metacharacters). I've written the following function to handle this: function notefilter() { var newfilter = Ext.getCmp('searchnote'); var searchStr = newfilter.getValue(); searchStr = searchStr.replace('?', '\\?').replace('*', '\\*').replace('+', '\\+').replace('{', '\\{').replace('}', '\\}').replace('[', … |
|
How do I deal with quotes here? What i want is /[^a-zA-Z0-9-_.,!()'\/"]/ but how do i deal the quotes? [CODE] $pattern = '/[^a-zA-Z0-9-_.,!()'"\/' . $whatever . ']/'; return preg_replace($pattern, '', $value); [/CODE] Cheers! |
|
Hi! I'm simply need to convert a string like: /blablabla/123123 to 123123 it should be easy I'm sure, but I can't get it :( |
|
Hi, A quick question - i have a string containing text like this: [CODE] \\u003cspan class=\\\"someClass\\\">Some text\\u003c\\\/span> [/CODE] How do i get that "Some text" value into an array? I tried [CODE] preg_match_all("/\\\\u003cspan class=\\\\\\\"someClass\\\\\\\">(.*?)\\\\u003c\\\\\\/span>/",$str,$res); [/CODE] Returns nothing. I think there's something wrong with the regex pattern. Maybe anyone can correct … |
|
HI I am new to regex, could anyone help me in finding the java code using regex: My input string is : MyData 68309486 Bob I want to fetch only the digits in sequence like 68309486. PLz help me!!! |
|
i have a following paragraph. [CODE] ++ a xxx xxxx ++ b yyy yyyy yyyyy ++ c zz zzz [/CODE] i need to delete this line. ++ b yyy yyyy yyyyy What is the regular expression i want to use? |
|
Hi guys, I seem to have come across a weird issue in internet explorer. I've been working on doing regular expressions for a register form, and I've checked it in Firefox, and Chrome and it seems to work for both of them but yet it doesn't work for Internext Explorer … |
|
I'm having a terrible time with regular expressions, possibly because I'm using a python2 reference, but maybe not. For example how would I find \s\w within a string and then change that character? |
|
I have tried parsing a website with curl and then searching it with regular expressions, but I have not been able to perform a regex search. Even if I try parsing news.google.com and then search for any non digit, the code returns that there is no match. If I run … |
|
Here is my code: [CODE] #------------------------------------------------------------------------------- # Name: Mocha Rotoscoping Via Blender # Purpose: Make rotoscoping more efficient # # Author: Jeff Owens # # Created: 11/07/2011 # Copyright: (c) jeff.owens 2011 # Licence: Grasshorse #------------------------------------------------------------------------------- #!/usr/bin/env python import sys import os import parser sys.path.append('Z:\_protomotion\Prog\HelperScripts') import GetDir sys.path.append('Z:/Blender_Roto') filename = … |
|
Hello, I need to find a way to use regex to exclude a phone number like this: +558499608822 I want any number that starts with the country code 55 to be excluded. For some reason \+55 does not work. Thanks for the help... |
|
Regular Expression (RE) They can be used with string operations. Using this, we specify the rules for the set of possible strings that we want to match (Searching for patterns in another string). Note : its finds FIRST instance of that pattern We can also use REs to modify a … |
The End.