1,034 Topics

Member Avatar for
Member Avatar for Argo54325

Hello i have a problem with lineing up each column up correctly, the directories seems to be all messed up. Bellow is my code, a screen shot of the problem is attached to this post. [CODE=C++]if(lSwitch == true) { cout << "\nd: " << setw(15) << right << "" << …

Member Avatar for GDICommander
0
98
Member Avatar for Argo54325

Ok I need some fast help with this, I'm trying to get a regular expression to work with my file system. this is what i currently have, but it seem to crash on, boost::regex expr(regex); [code=c++]void show_files (const path & directory, bool recurse_into_subdirs, bool lSwitch, bool rSwitch, bool aSwitch, string …

Member Avatar for Argo54325
0
188
Member Avatar for Argo54325

I've been trying all night to get this to work, but everything i do give me a compile or runtime error. currently I'm using file_size() (no idea what to include inside the brackets). Also if you have can help with any of the following it would help me greatly: -list …

Member Avatar for Argo54325
0
149
Member Avatar for murray_ramadhan

hey there this problem stuck me out how to display url like this [CODE]http://www19.domain.com/548ecedd7f87970e986dc19077ef2edd.rar[/CODE] [CODE]preg_match_all('#^(?:http://)www[0-99]([^/]+)#i',$url,$parts); foreach ($parts[1] as $test) { echo 'hehehe '. $test; }[/CODE] and the result is: [CODE] hehehe 9.domain.com[/CODE] it just stuck me out i'm already search the answer at least 5 hours :( i do not …

Member Avatar for murray_ramadhan
0
62
Member Avatar for Argo54325

Hello, I'm getting the following error with this code, also i would like to know how to add the path and filespec together with a and be able to split the 2 so it would be 3 args not 4. [B][I][U]ERROR:[/U] error C2664: 'std::vector<_Ty>::vector(const std::allocator<_Ty> &)' : cannot convert parameter …

Member Avatar for adam1122
0
163
Member Avatar for Argo54325

Hello, I'm working on a school project, and I'm so lost i can't even figure out how to start it. What I'm trying to start off with is just a simple console application that gets these settings: program.exe [switch] [path] [filespec]. how can i accomplish this? This is what i …

Member Avatar for Argo54325
0
161
Member Avatar for orwell84

Hello, I'm just wondering how you would go about exporting the matches that regex finds. For example, if I were to have the following code, which matches all the digits in a string and (supposedly) reads them into an array, which is then displayed: [CODE] @numbers = ($string =~ /\d*/); …

Member Avatar for KevinADC
0
94
Member Avatar for lml108

Hi, I've a file having some regular expressions. e.g. cat regex.txt [\t\n] abc.*pqr If I write a small bash script as below, while read line do echo -E "$line" done < regex.txt even with -E switch passed to echo the output is [tn] abc.*pqr So the backslashes have vanished in …

Member Avatar for Fest3er
0
86
Member Avatar for brakeb

Greetings, I have reached a point where I need some help. I have a tivo at home, and I'm trying to script something that will allow me to 1.) pull the XML off of the tivo, and save the file, 2.) Take the text in the XML, and pull out …

Member Avatar for brakeb
0
383
Member Avatar for herms14

[CODE] 1 // Fig. 29.24: RegexMatches.java 2 / Demonstrating Classes Pattern and Matcher. 3 import java.util.regex.Matcher; 4 import java.util.regex.Pattern; 5 6 public class RegexMatches 7 { 8 public static void main( String args[] ) 9 { 10 // create regular expression 11 Pattern expression = 12 Pattern.compile( "J.*\\d[0-35-9]- \\d\\d-\\d\\d" ); …

Member Avatar for herms14
0
101
Member Avatar for jeffc418

Hey all! I have a question that I just need a real solid answer to ;) Basically, I need a PHP script that checks values inputted by a form for special characters (only allows letters, numbers, and apostrophes). For form validation :D. I'm really not the best with regexes otherwise …

Member Avatar for pritaeas
0
105
Member Avatar for hkansal

Hello Experts, I am fairly new to MS SQL Server 2005. I am trying to create a table where a column has the restriction of allowing alphas only. I know how to achieve this in Oracle using String functions. But am not able to do so in MSSql. The replace() …

Member Avatar for hkansal
0
521
Member Avatar for katamole

Hi everyone, As a personal project I've decided to write a small script which will take a raw_input film title, then look up the IMDB rating and return the result. As an extra challenge I decided to employ re. Now, this is how far I have got (yes, I am …

Member Avatar for katamole
0
678
Member Avatar for toadzky

I have a HUGE text file (over 60,000 lines) and I'm using python to do regex fixing on the file. I want to wrap any lines over 100 characters, and wrap on a space. I know I can use ".{100}" to find 100 characters but when I do this: [code] …

Member Avatar for scru
0
158
Member Avatar for shadiadiph

does anyone know of any good resources for php regex for form validation. I am looking for good regex for name: (including -.' and no spaces in the first space no doubles of ..''-- phone: again no spaces at the start allowing + and - alpha: only lowercase letters no …

Member Avatar for shadiadiph
0
112
Member Avatar for SelArom

i wasn't quite sure where to put this, since this is more of an html/encoding question, but since I'm working in .net I figured this is the best place to start... I have a site, and the content-type meta tag is utf-8. I am receiving an rss feed, and am …

0
68
Member Avatar for forzadraco

anyone can help me to make regular expression [code ] $string=" xxxxx xxxxx <body border='0'> <script language=javascript> ... word1 ... word2 ... word3... word4 ... </script> "; i want to remove all word from that string if that string have minimal three word'x' preg_replace(); how to make that regex?

Member Avatar for nav33n
0
151
Member Avatar for sid78669

as part of my assignment i'm trying to validate an email address stored in an hash, with the key: 'email' and the value as the data supplied. But the email is not getting validated using reg-ex: [CODE] if($form_element{'email'} =~ m/^[A-z0-9_\-]+[@][A-z0-9_\-]+([.][A-z0-9_\-]+)+[A-z]{2,4}$/i){ $values = 0; $mail = "InValid!"; } else { $mail …

Member Avatar for sid78669
0
331
Member Avatar for perl1user

hi, i'd like to know how to get the number of regexp matches a pattern returns ex: if I have $_ = "fooFOObarBAR";$_ =~ /[a-z]/ it would return 6 thx SNIP

Member Avatar for KevinADC
0
311
Member Avatar for headedtomexico

I'm writing this little page that lets you sort of have a conversation with a perl script, and i'm having a problem. At the top of my php I access the perl script, with some text that the user input via a textbox. The perl responds with.. we'll say "Havin' …

Member Avatar for KevinADC
0
102
Member Avatar for elpablo

Hi, I'm trying to figure out what would be the best way to develop a regular expression class that can have child or parent. I want to develop a generic regex extractor for text files. Example : - An HTML file has a table - Each table has some data …

Member Avatar for elpablo
0
166
Member Avatar for ciarz3r

[code=java] import java.util.Scanner; import java.util.regex.*; import java.io.*; import javax.swing.*; /** * A program that parses a user-supplied URL */ public class URLParser { public static void main(String[] args) throws IOException { Scanner scan = new Scanner(System.in); PrintWriter out = new PrintWriter(new FileWriter("D:\\cs2200\\lab8\\URLs.txt")); String input=""; // Everything works the way I …

Member Avatar for stephen84s
0
111
Member Avatar for metalla_nz

I have the following repeating block of code in a website [CODE=html]<a href="LINK">TITLE</a><br>MANUFACTURER -- YEAR<br>PLATFORM<br>[/CODE] I need a regular expression to parse out the relevant bits in caps Ive been trying txt2re.com and expresso... But nothing generated there seems to do a decent job. I guess I need something that …

Member Avatar for metalla_nz
0
91
Member Avatar for metalla_nz

I have the below code, [CODE=csharp]string txt = "<table SUMMARY=\"Game Match\" border=0 cellpadding=2 cellspacing=0><tr valign=top><td width=25><b>2.</b></td><td width=60><a href=\"/game/gameboy-advance/legend-of-zelda-a-link-to-the-past\"><img alt=\"Game Boy Advance Front Cover\" border=\"0\" src=\"/images/i/36/26/365576.jpeg\" height=\"59\" width=\"60\" ></a></td><td><a href=\"/game/gameboy-advance/legend-of-zelda-a-link-to-the-past\">The Legend of Zelda: A Link to the Past</a><br>by Nintendo of America Inc. -- 2002<br>Game Boy Advance<table SUMMARY=\"Game Match\" border=0 cellpadding=2 cellspacing=0><tr …

Member Avatar for metalla_nz
0
155
Member Avatar for leegeorg07

hi again i have been looking at the bacon cipher and i have made this [ICODE]import re dictionaryofcodes = {'A': '11111', 'B': '11110', 'C': '11101', 'D': '11100', 'E': '110111', 'F': '11010', 'G': '11001', 'H': '11000', 'I': '10111', 'J': '10110', 'K': '10101', 'L': '10100', 'M': '10011', 'N': '10010', 'O': '10001', 'P': …

Member Avatar for leegeorg07
0
125
Member Avatar for inked

hi ive got this segment of code that im struggling with the code does what i want it to do in the sense that if i put in the filename of the file that i have created it works but for a random user the code will not produce the …

Member Avatar for KevinADC
0
122
Member Avatar for theimben

Hello, I need some help. Ive got this script which scrapes the [URL="http://www.imdb.com/chart/top"]IMDB top 250 movies[/URL] list. What Im trying to do is add a search link next to the year bit. Ive got it partially working with str_replace but it only adds the link to the first movie. [URL="http://www.theflickzone.com/misc.php?do=page&template=top250"]See …

Member Avatar for digital-ether
0
97
Member Avatar for amrith92

My friend got a virus on his computer some time ago. Its called MSRun32.exe, and it is absolutely wreaking havoc on his computer. Really, if it were any slower, time would be going backwards for it. I got rid of the virus, but I hadn't realized at the time that …

Member Avatar for caperjack
0
239
Member Avatar for jmasta

Hello everyone, I ran into an issue that I could use a little help with. I need to search a large string, match certain parts of it, and replace a certain part of the certain part. The entire string is made up of spans, tables, and images, to build a …

Member Avatar for jmasta
0
138
Member Avatar for gp04lch

hi all, recently ran into a really hard problem for me: i have an sql command with something like this SELECT xxxxx FROM xxxxxx WHERE filter LIKE '[A]' what i would like to do is substitute [ with [[] on the condition that it is after a LIKE and is …

Member Avatar for LizR
0
74
Member Avatar for mawst

Hello all, Wondering if someone can direct me to a regex component and some code that I can use to strip out certain links from an HTML file (loading in a StringList). Example: <a href="../foo/23134.htm">bar</a> The result I'm after is: bar I only want to strip the link here, but …

Member Avatar for mawst
0
140
Member Avatar for nathan08

hallo everyone, its good to be a part of such a huge group of tech and programming gurus. am a new to programming in c# and was hoping that there is someone out there who can help me in a small project that i have. i've attached it below,(2 files). …

Member Avatar for LizR
0
77
Member Avatar for CoolAtt

Hi. i have to extract the following line: C:\WINDOWS\lsass.exe i tried [QUOTE](\w:\\.*\.\w{3})[/QUOTE] it worked on some strings only. any suggestions ? plz help.

Member Avatar for CoolAtt
0
90
Member Avatar for MaRtO

Hello everyone, I just started learning c++ and I started with creating a programme that gets your wan ip adress. Just because it covers some basic stuff. Getting the content of the website works fine. But the parsing doesn't really work. If tried with sscanf, but it didn't work. Also …

Member Avatar for Salem
0
86
Member Avatar for JackDurden

Does anyone know how to search a text file for just alphanumeric words using regex? And could you show me?

Member Avatar for StuXYZ
0
107
Member Avatar for CoolAtt

hi ! does anyone know how to install & use the perl compatible regex (PCRE) api in Bloodshed Dev++ ?

0
93
Member Avatar for xorl

Hey I have a problem that annoys me a lot.... i want to extract all titles and songnames within a file, a *.pls file to be exact. ive read the entire file from beginning to end and ive splitted the text like so.. string[] titles = readpls.Split(new string[] { @"\n", …

Member Avatar for xorl
0
174
Member Avatar for lllllIllIlllI

Hi guys, I was just wondering how far peole have ever gotten in the python challenge? if you havent heard of it, it is a series of python based problems that explore many programming techniques including regex and images. If you havent tried it the link to it is: [url]http://www.pythonchallenge.com[/url] …

0
51
Member Avatar for K1Kingy

I'm trying to make a small program that will do a search on YouTube. I've managed to extract the title and get it to display but I am having trouble with the description. In the page source it looks like [CODE] <span id="RemainvidDescdMH0bHeiRNg" style="display: none"> DESCRIPTION HERE </span> [/CODE] Now …

Member Avatar for LizR
0
98
Member Avatar for unkwntech

I have the following code: [code=python] import re string = 'c:\test.doc' if re.match(r":\\[0-9a-z]", string): ##r":\\[0-9a-z]" should match ':\t' print 'true' else: print 'false' [/code] the problem I am having is that this is always evaluating to false.

Member Avatar for bvdet
0
135
Member Avatar for Poab9200

Hello all, I have a few questions and some problems. I've been doing some searching on the web and cannot find a source that can aid me with these issues. Anyways, I have several text box's that need to have the following properties: Numbers-Only Commas Ex. 1,000 instead of 1000 …

Member Avatar for LizR
0
117
Member Avatar for navsaug

Hi - Please help me with the following. I have to a parse a log file and here is the part of the log file which is occurs repetitively. [Text1] [Text2] [Text3] [Text4] [Text5] [Text6] [Text7] [ ===== PATTERN1 ======= Text8_line1: value1 Text8_line2: value2 Text8_line3: value3 Text8_line4: value4 . . …

Member Avatar for katharnakh
0
81
Member Avatar for mairtin.obrian

Im using regular expressions to identify currency characters from a html string I cant identify the £ symbol from a number of sites including amazon So Im looking for the syntax to identify that symbol <oRegEx = New RegEx("£[0-9]") > is not working and what is the syntax to identify …

Member Avatar for learnerbm
0
101
Member Avatar for udaydesai

Hello Friends, Plz Help Me regarding this. excel_files is the folder in which excel files r placed every time iam unlinking(deleting excel files) after uploading to database and iam retrieving excel files from mail so if any body send same excel sheet to mail it will download to folder excel_files …

Member Avatar for digital-ether
0
116
Member Avatar for Dekudude

Hi there! Let me start by saying this-- I have no experience with regular expressions. Simply put, I want a function that turns an array [eg: func(array)] into... an array, but add ONE space on both values. Meaning: [code=Python] array = ['red','blue'] #returns ['red','blue'] array = func(array) # returns [' …

Member Avatar for Dekudude
0
132
Member Avatar for cardician

Hello all, I'm hoping someone here might be able to provide some assistance. Let me see if I can describe the general problem I have and perhaps someone can offer some ideas on the best way to approach solving it. I've got a text file that is basically a dump …

Member Avatar for KevinADC
0
97
Member Avatar for cellus205

Can anyone help me translate this regex match in Perl to a VB.Net Regex match? Heres the perl regex: if ($line =~ /\\([\w\d\s\-]+?\.\w{3})\"\t\"/) { print "LINE: $1\n" } # regex match And heres what I have for the VB regex, but its currently not working: [code=VB] Dim fs As New …

0
74
Member Avatar for sarithak

Hey.. here i am going to do root map ..its working fine..but i have some extra features.. it includes (WHEN WE CHOOSE A COUNTRY ,THEN AUTOMATICALLY DISPLAY STATES IN THE OTHER SELECT BOX...THEN THE LOCATION WILL GOES TO SELECTED STATE..] PLZ DO SOME HELP AEAP............ its very urgent... here is …

Member Avatar for langsor
0
257
Member Avatar for webkrios

Hi, I have created a form and have successfully sent it to my email address. However, not all of the "message" comes through in the email. The only part of the message that comes through is the "contact" part. Can you please help?? I thank you very much in advance! …

0
75
Member Avatar for friendklay

[code=python] data = re.sub(u"\u102F*\u102D", u"\u102D\\2\u102F", data) data = re.sub(u"\u1031*\u103B", u"\u103B\\2\u1031", data) data = re.sub(u"\u1001*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1002*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1004*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1007*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1012*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1013*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1014*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1015*\u102C", u"\u1001\\2\u102B", …

Member Avatar for friendklay
0
348

The End.