1,034 Topics
![]() | |
Hey, I'm making a little program that will talk to you using fixed sentences etc., and I want to make it able to do math. How would I be able to check if a string contains + - * / and also contains numbers? and then furthermore, once I have … | |
hello every one im trying to send Email using ASP.NET with C# but when recieved it is marked as spam this is a problem... i searched alot and almost i put every thing to avoid marking my emails as spam..but all didn't work this is the piece of code i … | |
What i am trying to do is create a conosle app in vb.net 2008. I have a XML file (data_file.xml), and a template file (template.txt). The template file contains a few sentences, each one containing a placeholder which needs to be filled. I need to create multiple output files (.txt), … | |
Hi! I need to split a list if item A is followed by item B. I'm really stuck at this and the only thing i could think of is that i should use regex, but i dont know how. Example of list: list = ['email@email.com', 'email@email.com', 'email@email.com', 'REF123', 'REF123', 'email@email.com', … | |
Im using regex to pull an image url from a site and would like my site to display the image from that url. Anyone have an idea on how to do this since setting the image url to the response url isn't working? | |
Error 1 The type or namespace name 'RegularExpressions' does not exist in the namespace 'System.Text' (are you missing an assembly reference?) C:\Documents and Settings\IcetalkeR\My Documents\Visual Studio 2008\Projects\SciSem\SciSem\CodeFile1.cs 2 19 SciSem What do I do? | |
Hi, I have the following regex pattern. I don't think there is anything wrong with it. It seems to work when i test but if someone sees anything wrong with it please feel free to tell me. I don't know Regex but managed to put a username validator together as … | |
I am trying to run a source code that I downloaded. However, there are several error message in reference to the classes TablePanel, BufferedPanel, Stringable, and Booleanview. I am not sure why I am getting these errors because it is a complete source code. Do I need to import additional … | |
28 Minutes Ago | Add Reputation Comment | Flag Bad Post One last problem with my script, it returns this error message... [CODE]Traceback (most recent call last): File "C:/Python26/Renamer 3", line 23, in <module> os.rename(fname, b)WindowsError: [Error 2] The system cannot find the file specified.Traceback (most recent call last): File … | |
Hi People I need to compare a particular line in a file with a particular string in the other file. I am attaching both the files for your reference. here is my code: [CODE] open (INFILE, "$input") or die "Couldn't open $input for reading: $!\n"; while(<INFILE>) { my $line= $_; … | |
I am trying to delete any line of text that contains "$npname" and the word "in." The script works if $npname is only one word, but if it is more than one work I get "error: unterminated address regex" How can I fix this? [CODE]sed '/'$npname'.*in/d' parts.txt > parts.tmp[/CODE] | |
I'm trying to strip HTML tags and replace certain tags with newlines and tabs. I just can't figure out a function to do this, any ideas? I'd prefer to use regex instead of a library. | |
Hi, I am trying to transfer multiple select country to another select box. But when i click on submit i didn't get the value of array of list2 i.e finallist? I can't understand what is problem?? Please help me how to solve this?? [code] <? if($_POST["add"]) { echo "sdads"; echo … | |
requirement CSCI690 - Multicast Socket Programming Project [Objective] Develop a multicast client program to work in conjunction with a multicast test stream. [Requirements] The multicast client must be able to join any group/port, that is specified via the command line. E.g., mclisten <multicast group> <port> where multicast group is a … | |
Hi Guys and Gals! I come to you today requesting assistance! Let me explain what I am trying to do first, and then I will show you my code. The purpose is to read a list of regular expressions in from a text file (one regex per line, only about … | |
Hi all I've been trying to find a regular expression that checks if input contains any of the following characters only: `~!@#$%^&*()-=+\|/?.>,<;:'"[{]} I want to allow users to input any normal character a-z or any numbers as well as underscores and any special character that resembles a letter such as … | |
Hi, is there a way to read in a file to give a string which is passed to the method without reading line by line? I need to read in something like this... 1 MLRLPTVFRQ MRPVSRVLAP HLTRAYAKDV KFGADARALM LQGVDLLADA 51 VAVTMGPKGR TVIIEQSWGS PKVTKDGVTV AKSIDLKDKY KNIGAKLVQD 101 VANNTNEEAG DGTTTATVLA RSIAKEGFEK ISKGANPVEI … | |
I am a perl beginner and need some help with regex Input for this code is : aatgatgataaggtaaggtatgatgatgatgatgatagtagannnnnnnnnatgcatga'/atgca.atgactagca/atgactagcaaggtaaggtaaggtaaggtaaggtatgatgatgannnn./atgatgactagactgacaaggtaaggtaaggtatgatgatgatcgatgacgat... and so on Here i am trying to assign input file as a scalar variable and trying to find a match of "aaggtaaggt" and then skip some 100 characters whether they are … | |
Hi, i was searching for a correct url regex, but unsure how would i do it. I am not very expert in regex. So can't be sure that this will always work. I wanted to be able to match even inner urls, such as: [url]http://google.com[/url] [url]http://www.google.com[/url] [url]http://google.com/something?some=unsome&w=anything[/url] i only wanted … | |
I'm trying to filter the contents of a vector of type string, based upon a regular expression. NB: I'm using the boost::Regex library So far, I've got the following [CODE] boost::regex r("[A-Z][A-Z]{3}<\\/t|[A-Z]{3}<\\/t|[A-Z\\.]{3}<\\/t"); for(int i = 0; i < vStream.size(); i++){ if(boost::regex_match(vStream[i],r)) cb->Append(vStream[i]); // cb is a combobox for my GUI … | |
I'm really having some difficult wrapping my head around regex and preg_replace. What I want to do is have a function that scans an entire page for any <a href> tags pointing to Youtube and then convert them into an embedded youtube video. Here's a code to show kinda of … | |
Hi, I got the syntax error in my following php code: unexpected T_STRING in /net/home/z6zhou/public_html/signup.php on line 1. Who can help it out? my php code is as follows: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><title>Publication DB</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta … | |
Hi everyone, I'm a javascript/actionscript/java/ruby developer who's been given a project that must be done in Sharepoint. One of the tasks of the project is I have to write a console application that replicates data from the secure sharepoint site and pushes it out to a public site in a … | |
Good day to you all, I feel very excited being in the midst of gurus and great enthusiasts of programming... I have a little challenge in completing a program intended to read records from a file <notepad> and place them in an orderly manner on a pdf file <so as … | |
Hello, I have the following code in c++. [ Windows Vista / Visual C++ 2008 ] It works fine if you pass 5 links in the "multiq" at first. If you pass any more than that it works fine again (populating the map "buffer" correctly) but then it crashes right … | |
Hi there, please can some help with this very simple regex. I am coming from c# and trying to get up to speed quickly, so have been trying to create samples for my refrence, however can not get this to work [code] String aString = "0123"; Pattern intPattern = Pattern.compile("^[0-9]{3}"); … | |
Hi!!! I am using following code in which I am generating the latex format. Here I want to use the combination of characters[A-Za-z], numbers[0-9] ,special charactes(like Ï€ ,θ ,α ,β ,γ ,°,+, - ,×,÷,√ ,(,)etc) ,decimal numbers. For entering special characters I have used toolbar Can anyone tell me how … | |
Hi I receive ascii data from the serial port which consists of only 0 to 9, /005, /004 and spaces between values, but sometimes the harware get spikes from the electric motors and then the recorder add some funny characters. I need to check the string PortData = "" to … | |
I have phone area textbox and i want to test it against values like 1111111 or 9999999. I want at least 1 character to be different in this text area(it is exactly 7 characters long) How can i do this in its shortest way? | |
Hi, I have done a lot of regex in perl and feel like in no mans land in c++ :) Well I want to parse a tab delimited file and want to print specific fields as per my needs. One more thing the input file may not be sorted and … ![]() | |
Hi, I want to process the following xml: [COLOR="Green"]... <a> HHHHeader 1 : xxx <it> yyy </it> zzz HHHHeader 2 : aaa bbb <it> ccc </it> </a> ...[/COLOR] And I want to get via a xslt the following xml [COLOR="Green"]... <a> <Header hd="1"> xxx <it> yyy </it> zzz </Header> <Header … | |
[code=php]$matches=array(); preg_match_all($regex, $fragment, $matches, PREG_PATTERN_ORDER); [/code] I get the following error for the input $regex = [\]world[\] and $fragment = hello world: Severity: Warning Message: preg_match_all() [function.preg-match-all]: Compilation failed: missing terminating ] for character class at offset 11 Filename: controllers/admin.php Line Number: 499 can someone please help ?? :( | |
Hi guys!! I've to make a program that reads an arithmetical sentence from a textbox, e.g 12.3*34+4*5-3 and then on another textbox identify and display what is the content of the first textbox, for example taking the last ex: If I have this input: 12.3*34+4*5-3 The output should look like … | |
Hi, I have the following string and i will pass the filename and then i want to get the corresponding path... [CODE]string url = @" --------------Boundary-00=_BLD1cvEPKmuNkgPvUNY3 Content-Type: text/plain; charset=utf-8; name=footer.txt Content-Disposition: attachment; filename=\""footer.txt\"" Content-Transfer-Encoding: base64 G:\test\Attach\test\footer.txt --------------Boundary-00=_BLD1cvEPKmuNkgPvUNY3-- "; Regex r = new Regex(@"[a-z]:\\([a-z1-9\.\s]+\\)+[a-z1-9\.\s]+\.\w",RegexOptions.IgnoreCase); string regString = r.Match(url).ToString();[/CODE] I am able … | |
Hi, I am trying my hands on Java Regex. Here is my program below with the description of what I require it to do actually. The thing is that this MyKeyword May occur multiple times in a file. Also My program works for a file like this:- [CODE](\\S+)<tab>MyKeyWord<tab>(\\S+)<tab>(\\S+) (\\S+)<tab>MyKeyWord<tab>(\\S+)<tab>(\\S+)[/CODE] but … | |
HI, I've got a list of 10 websites in CSV. All of the sites have the same general format, including a large table. I only want the the data in the 7th columns. I am able to extract the html and filter the 7th column data (via RegEx) on an … | |
I have two function that replace certain strings in a text file. The first one works perfectly: [CODE] Dim readAlias As String Dim RxDIR As String = Nothing Try RxDIR = Registry.GetValue("HKEY_LOCAL_MACHINE\Software\RLtd\R", "MAIN", False) RxDIR = RxDIR + "\Bin\Configuration\alias.config" Dim sr As StreamReader = File.OpenText(RxDIR) readAlias = (sr.ReadToEnd()) sr.Close() sr.Dispose() … | |
Hi, I have the following string in a XML file.. [CODE]<pre></BODY></HTML> ------_=_NextPart_002_01C84D7E.9133E008-- Content-Disposition: attachment; filename="footer.txt" Content-Transfer-Encoding: base64 G:\Test\Attach\footer.txt --------------Boundary-00=_BLD1cvEPKmuNkgPvUNY3-- Content-Disposition: attachment; filename="Press.xls" Content-Transfer-Encoding: base64 g:\Test\Attach\Debankan\Press.xls ------_=_NextPart_001_01C84D7E.9133E008-- </pre>[/CODE] I will pass the filename and i want to get the path from the above string.. [B]For ex.. if i pass "footer.txt" i … | |
Hello all I have never posted before and bit of a noob I have a problem i hope someone can help with... I have a wysiwig editor (nicedit) attached to a page which gets called and allows the user to edit portions of the page in a modal window. This … | |
I have this script: [url]http://snipplr.com/view/19692/g-or-y-search-hilite/[/url] but it won't search for chars like ')' . How should I adapt it? Thanks. | |
guys i need an error-free way of keeping name value pairs in a regular c# string. i am quite busy, i dont think i am able to come up with the best algorithm now. what i want is two methods one to add a name-value pair to the string, the … | |
How can I use cfloop or query my database so I can select home game and away game for multiple selections. I need to select 1 selection for home and away game but have to be able to select 1 of each. here is my output [URL="http://67.219.102.67/wcfootball/index2.cfm"]http://67.219.102.67/wcfootball/index2.cfm[/URL] [CODE] <script language="JavaScript" … | |
Hey I need a regex that would allow following input matches: 0.1,1.1, 0.001, 1.4, in short number should be less than 2.00. Thanks for help. | |
![]() | Hi, I was wondering if there's a framework that can help me with the following: I currently have regex checks on html input fields that work 100%, I would like to also have a check to the database for duplicate records so that if the user enters an ID that … |
I am aware that JavaScript arithmetic does not handle either really large numbers or decimals well. This is why I have made this library of functions. I am posting it here rather than under "code snippets" because I would like to learn from your comments. Along with the library is … | |
Hi mate, I use regex for my validation but @ this time I get confuse, how to use white space in it. I want user to enter a city name, some city name contains white space like Los Angeles, New York, I have regex which is not allowing user to … | |
![]() | Hi, I'm trying to create a single instance of a regex term. i.e. [CODE] boolean rProcessEndpoint = Pattern.matches("[http://]{1,1}", processEndpointInput); System.out.println(""+processEndpointInput); [/CODE] However, with this particular instance, you can type "http://http://" and it will return true. Here is my source of information: [url]http://www.dreambank.net/regex.html[/url] Here is where I test my regex: [url]http://www.regular-expressions.info/javascriptexample.html[/url] … ![]() |
When I fill my Contact Form 1) select option TITLE (MR. MRS. MISS) 2)First Name 3)Last Name 4) E-mail I make validation to all data, The question is when I select title e.g. MR and then fill first name, last name AND e-mail IS NOT right (info2company.com) validation said *Email … | |
I invented an encryption algorhythm today and used it to "hide" the information in an unused password I came up with. This was done on paper, not with a program. However, I am planning to start laying some code down for this today (in Haskell, partly as an exercise to … | |
Make regex creation easier! Enter regex, test string, select from various function to run, then see the output. |
The End.