306 Topics

Member Avatar for
Member Avatar for SCass2010

Hi everyone, Just wondering if anyone could help. At the minute I need to check a command line for the parameter "--date=something", I've been using the re module with python like this cmd = "python myapp.py --name=stephen --date=20120323 --test=testthis" found = re.split (r"--date.*", cmd) print found but this prints the …

Member Avatar for TrustyTony
0
181
Member Avatar for srinidelite

var RE_SSN = /^[0-9]{3}[\- ]?[0-9]{2}[\- ]?[0-9]{4}$/; hello , i would like to know what is the meaning behind in these ^ ,[\- ],$ symbols??? and i would able to follow that the script logically verifying the format of text being entered!! i.e NNN-NN-NNNN... Thanks in Advance .. Srini.

Member Avatar for srinidelite
0
105
Member Avatar for erogol

I try to match 01010 with /010/ but there is one return ([B]010[/B]10) for this match. There are actually two match (010-is common-10) in that string with regex. I used /010/g but againit returns just one match. Is it possible to match this regex twice with such string?

Member Avatar for d5e5
0
155
Member Avatar for erogol

I try to have a regex that has at least constraint in a string like "a string has at least two 'a' in it" and possibly "a string has at most three 'a'". Do you have any suggestion how to do it? Thanks for any answer?

Member Avatar for replic
0
81
Member Avatar for termin8tor

Hello all! I am working on a regular expression to be used in descrambling words in my scrabble solver. What I am attempting to do is write a regular expression that can be used to find all characters within a scrambled word, irrespective of order and match them to a …

0
91
Member Avatar for Aamit

Hi, I need some deep knowledge Regex Vs Dom. Is Regex much faster then Dom or not? Like processing speed, reliable or not . If any one share link or article it helpful for me.

Member Avatar for pritaeas
0
174
Member Avatar for baig772

Hi all i want to check regular expression of a text field value i.e. it should not contain any '.,@' and other special characters except '_' and '-'. How can i write my rule in [code]preg_match()[/code] ?

Member Avatar for baig772
0
152
Member Avatar for hamidvosugh

In this string "13 12", I like to find if there is an occurrence of '3', but I am not interested in char '3' which is part of "13". In other word I am looking for number 3 not 13. By using the following code in python I always get …

Member Avatar for Gribouillis
0
158
Member Avatar for klemme

Hi all, I want to replace these charachters: Æ,Ø,Å,æ,ø,å, with, AE,OE,AA,ae,oe,aa I thoght I could use preg_replae this way to accomplish that, but if i write this word in the form: "Bælter" - All that is left to be inserted into the DB is "B" - So I am removing …

Member Avatar for klemme
0
182
Member Avatar for andy106

Hi We have moved our site with a new system with a new structure. the domain is the same just structural changes, and I cant seem to get the htaccess right. Here is what i am trying to accomplish: move this: [B][url]http://www.domain.com/chairs/519.htm[/url][/B] to: [B][url]http://www.domain.com/catalogsearch/result/?q=519[/url][/B] we have over 5000 links so …

Member Avatar for rubberman
0
186
Member Avatar for gamebits

Sometimes ago with the help of some programmers I wrote a piece of code to parse result from ebay's website, title, item number, bids, price sold and date. This is the regex that used to work to get the title of an auction that ended with a sale. [CODE]$match_count1 = …

0
91
Member Avatar for desup

Hi all, I need help with one script. If i Have string like [CODE]$str = "0001564[B]A[/B]58749655[/CODE] I need to find that [B]A[/B] in this string, and count which number is it (When tha A is on the third place, return 2 [starting from 0]) A think regular expression will be …

Member Avatar for desup
0
135
Member Avatar for Cupidvogel

Hi, suppose I have a file named [B]first.txt[/B] from which I want to read. Suppose the text file looks like this: [quote] I like you. I feel your soul. [/quote] Now if I use this: [code] open cool, "< first.txt"; print <cool>; [/code] the entire file content is printed, but …

Member Avatar for d5e5
0
280
Member Avatar for Melow

Hy I want to validate expression as such: [code]AO:10 EM:1 IO:102 AO:SA EM:SA,AKA,LLMN[/code] so on... I'm noe to Regex and i came out with the following function: [CODE] public void checkFormat(String line) { String expression = "^[ACEILMNOU.]{2}+\\B[:]{1}+\\w{2,4}+"; Pattern subscriptionExpretion = Pattern.compile(expression, Pattern.CASE_INSENSITIVE); Matcher matcher = subscriptionExpretion.matcher(line); if(matcher.matches()) { System.out.println("matches " …

Member Avatar for Melow
0
191
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
281
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
235
Member Avatar for sugumarclick

Hi all, I am dealing a small issue. I am missing something silly :). My need is that I want the entire lines between <TABLE> </TABLE> with no modifications. [CODE]<?php $some_string = <<<STR <HR noShade size=2> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR="" > <TR BGCOLOR="c1ffcc"> <TH ALIGN="LEFT" COLSPAN=22> <font face="Arial,Helvetica,Geneva,Swiss,Verdana" size="2" …

Member Avatar for pritaeas
0
198
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
201
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
383
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
149
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
162
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
213
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 trektrak

I would love to know, if it's possible to get a specific data from a specific mysql table.. Let say on the table itself has a Varchar ... mixed of words and floats.. and then ... I want to pull only the float from the table using php... can it …

Member Avatar for trektrak
0
141
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
128
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

The End.