269 Topics

Member Avatar for
Member Avatar for debasishgang7

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!

Member Avatar for snippsat
0
278
Member Avatar for klemme

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 …

Member Avatar for klemme
0
235
Member Avatar for jesse.johnson

[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 …

Member Avatar for jesse.johnson
0
222
Member Avatar for IanArcher

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, …

Member Avatar for hakeemtunde
0
1K
Member Avatar for AnkurThakur

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 …

Member Avatar for pritaeas
0
151
Member Avatar for jola.chmiel

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 …

Member Avatar for jola.chmiel
0
200
Member Avatar for AndyPants

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 …

Member Avatar for gusano79
0
380
Member Avatar for Swiftle

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 …

Member Avatar for pritaeas
0
127
Member Avatar for crapped

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 …

Member Avatar for pritaeas
0
148
Member Avatar for debasishgang7

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" …

Member Avatar for pritaeas
0
160
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
210
Member Avatar for Narayanan87

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...

Member Avatar for Aviras
0
84
Member Avatar for rayidi

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

Member Avatar for pritaeas
0
127
Member Avatar for davedpss

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 …

Member Avatar for diafol
0
79
Member Avatar for klemme

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 …

Member Avatar for pritaeas
0
2K
Member Avatar for RicardoE

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 …

Member Avatar for smantscheff
0
142
Member Avatar for andimiami

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" …

Member Avatar for andimiami
0
114
Member Avatar for Dani

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 …

Member Avatar for diafol
0
2K
Member Avatar for deepak.marur

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('[', …

Member Avatar for deepak.marur
0
394
Member Avatar for woopi

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!

Member Avatar for woopi
0
1K
Member Avatar for bipies

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 :(

Member Avatar for diafol
0
103
Member Avatar for Buppy

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 …

Member Avatar for pritaeas
0
143
Member Avatar for Narayanan87

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!!!

Member Avatar for thekashyap
0
155
Member Avatar for DILO3D

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?

Member Avatar for pritaeas
0
123
Member Avatar for ghost_from_sa

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 …

Member Avatar for vibhaJ
0
244
Member Avatar for JoshuaBurleson

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?

Member Avatar for JoshuaBurleson
0
300
Member Avatar for 100110010110100

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 …

Member Avatar for 100110010110100
0
892
Member Avatar for JeffOwens

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 = …

Member Avatar for Enalicho
0
132
Member Avatar for Ender330

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...

Member Avatar for pritaeas
0
66
Member Avatar for arindam31

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 …

Member Avatar for arindam31
-1
233

The End.