1,034 Topics
![]() | |
i have a field in my database with numbers like this....... ,27,,277,,4277,,677,,678,,6688,,8754,,123478, each number was updated (added) like this .. ,27, all numbers updated are unique, when i try to match ,27, i get ,27, ,277, ,4277, not just ,27, my code is like this... [code=php] $id = 27 $string … | |
Hello, I'm totally out of luck with creating a working patternt to match for my preg_match. What I would like to do is, create a pattern that will match sentenses in a bunch of text.. It should recognize a word that has a capital letter and take it as the … | |
Hi all, This is sri. I've done some program to read xml elements in java.But i didnt get them in a structured way like root element and its name and child elements and their names.I am getting end tag names after tag value also.so pls help me in getting elements … | |
Hi there, I am busy with a ajax driven application in combination with Wordpress and now i found a great script that will convert every link into a ajaxlink that will call its content to a div. great, and it works! sometimes :( when it outputs urls like [url]www.domain.com/#/information[/url] or … | |
Hi Danimates, Recently i faced a problem while running the program... I had a site called.... SNIP This is POST method website....i written all REGEX parts well.. But writing in Program in content(" ") v should copy the content... But from that site i [B]didnt find the content of that … | |
Hi. I have a function that needs to split a string on the seperators given by the function. so if i had the seperators as !.?: then it should split the string at those points. if i have a string 'hello. world! hello.' how can i return a list with … | |
Below is my code [code] string str2 = "1, 2, 3, 4, 5, 6, 7, 8"; string output; typedef std::tr1::sregex_token_iterator sti; const sti end; for(sti i(str2.begin(), str2.end(), regex(",\\s"), -1); i != end; ++i) { //output += "\"" + *i + "\", "; output += "\""; output += *i; output += … | |
Hey all, I am a relatively new programmer and am trying to use Boost regex for my program. My code is: [CODE]#include <boost\boost\regex.hpp> using namespace std; double scrape( string base, string match ) { boost::regex re(match); boost::smatch matches; string::const_iterator start; start = base.begin(); while( boost::regex_search( start, base.end(), matches, re ) … | |
I have a code which parses/validates all the fields present in i/p weblog file. My first field is ip_address & currently can have a value like 12.45.24.245 Now I have a change where ip_address can be a dummy value something like $10.00 or $23.123.34. or $12.233. How should I change … | |
Anyone have an idea what the regex would be for preg_split to split a string at a semicolon ([icode];[/icode]), but ignore any quoted (single or double) parts as well as ignore escaped ([icode]\;[/icode]) semicolons? I have tried to decipher this one and could not (regex not my strongpoint - YET) … | |
Hi, I cant seem to convert the following into vc++ from vb.net. [CODE] Dim i As Integer Dim address As String = myReader.Item("Address") Dim addresses() = address.Split(" ") Dim secondPartIndex As Integer For i = 0 To addresses.Length - 1 If Regex.IsMatch(addresses(i), "^\D{1,}$") And secondPartIndex = 0 Then secondPartIndex = … | |
I have an XML-form (Silverlight application) with validations in C#. My XML-code works fine, but I'm having problems with the C# part. For every textbox I first check that the textbox is not empty (this works fine), and if it's not empty I check that the input is correct. My … | |
Hello, I have a login form and a user can register their email address. But I was wondering how do I only allow certain email domains able to register? Like if I only want @gmail.com or @yahoo.com only This is my code right now [CODE] /* Email error checking */ … | |
Here I am required to use REGEX to do the stock price program, yet I found it almost impossible for me to do, I can only deal with for loop. '''Parse Stock prices. Create a function that will decode the old-style fractional stock price. The price can be a simple … | |
My name... I'd rather not say. Intrade is fine. I would prefer to be referred as this name than my others anyways. I'm a very shy individual. I have a great need to become not just a good programmer, but a good Computer Scientist. I apologize for my past deeds … | |
hi.... i've developed on ssrs report which displays the number in words i.e in million and billion.. i want it in crores ,lakhs,thousands,hundreds,rupees and paise.. can any one modifiy the code below.. which is in reports properties->code tab.. the below is my code which is of million and billion dollars … | |
Greetings So i'm trying to figure out how regex works and already run into a roadblock. I figured out the easier ones, if a string only consists of numbers or letters. But these required a little more thought it seems. These are three random linen that i need to check … | |
Hi Folks, I'm a noob but I'm slowly getting addicted to python. I've been hitting a wall for about 4 hours trying various things to no avail. It looks to me like it should work and runs without error but.... I expect the blockcount counter to be high (but it's … | |
Hello guys! I'm trying to learn the Boost regex library for a more-convenient means of error-checking and the asio library to allow a fairly portable-means of manipulating data over TCP/IP. My goal is to retrieve the file information from a website (basically http layer). My first problem is determining the … | |
Hi all, I'm relatively new to Perl and particularly new to regular expressions. This is really simple script I've just mocked up. All it does is to take the input string and check if it's in the correct format or not. Here are some examples of correct format (will always … | |
I have a file named test.txt I get the file [CODE]file=open("test.txt","r") obj=file.read() file.close() print obj a=a b=b c=c d=e e=d e=f f=e f=g g=h[/CODE] All I want to do with this obj is that, I've to create a regular expression such that, 1.If the left number matches the right number, … | |
Heya Daniweb, I've been working on Regular Expressions, thanks to cghtkh who told me about them. I've used resources from: [URL="Newthinktank.com"]NewThinkTank.com[/URL] [URL="http://docs.python.org/library/re.html"]Python Regular Expression Documentation[/URL] and [URL="daniweb.com"]Daniweb.com[/URL]! I figured I'd share my code, ask a few questions, and get some feedback on what I did if I can. Feedback helps … | |
I'm fairly new to Boost. I would like to use the Regex library. I wanted to follow this guide but it seems that it supports other versions of VC++. [url]http://www.boost.org/doc/libs/1_44_0/libs/regex/doc/html/boost_regex/install.html[/url] EDIT: I tried finding a link to VC++ 6.0 and I can't find it >_<, apparently Microsoft is no longer … | |
[CODE=php] $file=file("templates/index.html"); $rcontent=join("",$file); preg_replace("/{{(.*?)}}/e","$$1",$rcontent); //explain this regular expression statement alone print $rcontent; [/CODE] | |
How can block url in asp? here i could only when the input is https://www.myopenid.com ie, when it starts with https://www.myopenid . But i want to block the input in the following cases 1) www.myopenid.com (here .com ,.in ,.org etc) 2) myopenid.com I give asp code below that i used: … | |
Hi guys , I have a number format like nn.nn.nn and nn.nn. I want to write a regex t check either one of them exist or not. I wrote this [CODE]^(\d\d).(\d\d)$[/CODE] but it only applies to nn.nn. Since i'm not ood in regex. i couldnt think a way to check … | |
Hi, I have a piece of Javascript that I need help revising it to fit my needs... My NEEDS: I need this script to work with Megavideos as well, Right now it works with just Youtube videos, and Vimeo Vids. Here is the Script: [CODE] (function($){$.prettyPhoto={version:'3.0'};$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend({animation_speed:'fast',slideshow:false,autoplay_slideshow:false,opacity:0.80,show_title:true,allow_resize:true,default_width:500,default_height:344,counter_separator_label:'/',theme:'facebook',hideflash:false,wmode:'opaque',autoplay:true,modal:false,overlay_gallery:true,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},markup:'<div class="pp_pic_holder"><div class="ppt"> </div><div class="pp_top"><div class="pp_left"></div><div … | |
Hi, I want to parse the time from a string in c#, something like, [CODE]TimeSpan a = new TimeSpan(); string pattern = @"^\d{1}:\d{1}@"; if ( dt.Rows[x][y].ToString() != "" && System.Text.RegularExpressions.Regex.IsMatch(dt.Rows[x][y].ToString(), pattern ) ) { if ( !TimeSpan.TryParse(dt.Rows[x][y].ToString(),out a ) ) { MessageBox.Show(b.ToString()); } }[/CODE] So, if I have a string … | |
Hi all, I am new to threading. I am trying to send HTTP Web Request using multi threading, I am not able to acheive what I need. My requirement is to send request to thousands of same or different websites and parse the response i get it from httpwebrequest. In … | |
Hi Everyone, Do you know how i can get the values using Regular Expression between the opening and closing tags of xml files? I need to process xml files using python and i just need to get the values between tags. For example: [CODE]<name value>my name is </name value>[/CODE] i … | |
Is it the boost library? Regex in particular? I have searched and searched, but this is all I could come up with. If this is the correct library, then how do I get it to work in Dev-C++? I managed to add all the boost .h files to my Dev-C++ … | |
I need to build a program which will upload a .txt file to the server, will read it using StreamReader and the populate an existing SQL table with the concent. The first Page (profiles) does exactly that and works perfectly.. It has a text delimiter and splits the text into … | |
Hallo everybody, Can someone help me with some regexs for testing : - in a textbox , i need to test only string carachters , not numbers,digits, spaces; - in a textbox , i want to text only numbers, not strings, char..other. Please.. Pattern patternForInfo = Pattern.compile("[a-zA-Z]", Pattern.CASE_INSENSITIVE); Pattern patternForNumere … | |
Hi I'm looking for good tutorial/s about using boost::regex with c++ code examples any links would be really helpful... Many Thanks Steve PS not tuts about setting up boost, done that already. | |
I have a string in Python that is comprised of code in C/C++ syntax. I would like to use regular expressions to search through this string and replace an expression of the form 'pow(a,b)' with 'a^b' I've attempted to do this, but my code does not seem to be working. … | |
Hello everyone, i have a problem using the replaceAll method and i hope that somebody can help. I want to remove substrings (sub) from a string (message). The message string looks like that: prop(ag1,0,1,4,5)/prop(ag2,2,5,3,3)/prop(ag1,0,1,4,5).... I want to take each prop(...) and put it in a list, but not the duplicate … | |
I am getting System.IndexOutOfRangeException everytime I try to compile my program. This is where the error is happening. [CODE] public static string findlinks2(string source) { char quotes = (char)34; //sets the char variable to quotes since you can't use it in a string normally string searchstring = (quotes + "fmt_url_map" … | |
Hi, I am developing a Winform app in 2010 Express. I want to be able to srip out superscript and subscript characters out of the strings that I am cutting and pasting from web pages. For example: [CODE] 1 I, Nephi, having been aborn of bgoodly cparents, therefore I was … | |
Hi Guys I am really green when it comes to regex , I have never had to use it much but here goes, I want to be able to remove html tags from a string so I am only left with the content. i am using [CODE] String.replaceAll("<(.|\n)*?>","");[/CODE] This doesnt … | |
Hi, I have two files and each consists of modules and in turn modules consists of some verilog data and instances.i have to search for module name in the two files and comapare the contents of the modules in the two files. i have code it does module search,extract the … | |
hello... i am getting problem with this regex....what is the exact format of this pattern only 000-000-0000. exact this pattern only not other U.S phone number format. why because i am using below javascript for this validation. [CODE]if(window.document.UserDetails.phone.value=="") { alert("Please Enter The Phone Number") window.document.UserDetails.phone.focus(); return false; } var pattern … | |
Below you will find my code for a form. I am trying to do Regular expression. I have the expression but when i enter something that is not right it will still post. I believe the reason is that i am still calling the $_POST of original not taking into … | |
Hi, there, I am also very new to Java. For class, I have to create an structure that reflects that of a document stored in a plain txt file. The hyerarchy of the classes is: Class document is made of //complex objects class Page objects, that are made of class … | |
Hello! I have a problem with filtering JTable (AbstractTableModel)... So, this is my code: [CODE] //Create table and filter public TableRowSorter<MyTableModel> sorter; public static MyTableModel tableModel; ... //Define table and fill it with List "userDataList" List<UserDataRow> userDataList = readuserdatafromfile(); filetree.Form.tableDetails = new JTable(); tableModel = new MyTableModel( userDataList ); filetree.Form.tableDetails.setModel(tableModel); … | |
I'm new to perl, some experience in python. I've been tasked to create a script to remove comments in files. So basically id like to remove <!-- comment here --> from every line that has it in an assortment of files in a directory tree. Some comments may span multiple … | |
Hello everyone, I have a small problem for using a regex in PHP. The problem is that I get a text output from another website. I want to get some informations by using a regex but I'm not sure in advance how the informations will be display. Here the example: … | |
Hi Everyone!:) Searched net up'n down and also related threads but can't figure this one. I have this: RewriteRule ^(\w+)$ index.php?pageid=$1[icode] for the purpose of pretty urls. Now, as long as pageid is a single word, everything's nice, but if there are dashes (kinda-like-this) it simply doesn't work, that is, … | |
i want to implement this feature : if i have a following sentence : {my name is james vick and iam a {member|user|visitor} on this {forum|website|site} and iam loving it | iam admin and iam a {supervisor|admin|moderator} on this {forum|website|site} and iam loving it} on a click of button i … | |
Hello everyone, i'm porting an application from C# to C++, and i find the syntax and all that of C++ rather cumbersome (though C/C++ was my first language). I have a very specific question, and another few more-or-less general ones. The specific question: In C#: [CODE] Bitmap image; BitmapData ImageData; … | |
Hey everyone, (Hopefully) a rather quick question. I'm currently trying to use regex to search a string for the location of the longest continuous match in a string where the *same* character keeps repeating. It doesn't matter which character it is, as long it is the highest number of consecutive … |
The End.