1,034 Topics

Member Avatar for
Member Avatar for nodoid

Hi, I've got a small problem here in replacing html for bb. I can go bb to html really easily (see the code below), but when I go the other way, I get the same text returned as when I put it in [code] if ($tobb == 0) { $search …

Member Avatar for lordspace
0
352
Member Avatar for ChrisP_Buffalo

This is a follow up to my solved thread a few days ago about extracting parts of a RegEx search in a web scraping app. Now, I have a script that includes 4 RegEx searches that each work individually. Now I want to compile all 4 into a single search …

Member Avatar for bvdet
0
5K
Member Avatar for FullBjarne

Why doesn't this code work? [code]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Text.RegularExpressions; namespace WindowsFormsApplication2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { for (Match match = new …

Member Avatar for FullBjarne
0
152
Member Avatar for Swetadri

Hi All, I have a problem.For my project, I need to log-in to yahoo.com by giving just username and password in my jsp form and I have to retreve the url of rssfeeds which I have subscribed by My Yahoo. I am not finding how to do this. I tried …

0
131
Member Avatar for nidhsek

my string looks like this, <place id="opt1"><data>data 1-data2 ! data3</data></place> I'd like to remove space, -, ! from only data element (data 1-data2 ! data3) using regex. Rest of stuff should be as it is (<place id="opt1"><data></data></place>). Any idea?

Member Avatar for weigp
0
62
Member Avatar for raul15791

Hi, I try to compare items in two different arrays. This loop works well in another program of mine. But not in the current program i'm working on. Weird.... The output of the program shows [ICODE] Nested quantifiers in regex; marked by <-- HERE........ [/ICODE] [CODE=PERL] for $3 (@obsolete_class_declare) { …

Member Avatar for raul15791
0
142
Member Avatar for muppetjones

I'm still kinda new at this, so please bear with me, but I have tried debugging the program (perl -d) and using Carp as well. I just can't seem to isolate the problem. I'm using regex to search through a series of sequences read in from BioPerl (this is not …

Member Avatar for KevinADC
0
139
Member Avatar for kasunc

hello pals, I need a help with using re module to search and convert uppercase words in a string to title case Eg: [code] mystr='Hello everybody. Some times THERE ARE upper case words' #Results should be 'Hello everybody. Some times There Are upper case words' [/code] Hope you can give …

Member Avatar for kasunc
0
296
Member Avatar for pratap.iiit

I have written a small code to parse and execute a sql statement but it fails to execute statement if it caontains ['<=','>='.'!=','<>'] how can i make changes in following regex. rawstr = r"""(.*)[( *)?]?([|=|>|<])[( *)?]?(.*)""" string_to_join="([ *]?and|[ *]?or|[ *]?not)[( *)?](.*)[( *)?]?([=|>|<])[( *)?]?(.*)" sql statement ="select name from table_name where …

0
46
Member Avatar for haikur

Hi everybody! I'm trying to write a program that is able to look inside a txt file and change, for example, the first word with a similar word. The txt file will have one word for line. EXAMPLE::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ORIGINAL TXT FILE: tom lives CHANGED TXT FILE: mum lives :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: I …

Member Avatar for Miyuki
0
128
Member Avatar for Alex Edwards

Does anyone have an website they would recommend to me for learning Regex? I have tried using the Sun's tutorial on Regex as well as the Pattern and Matcher classes that use Regex but I am not quite understanding it. I'd like to use it to return the String values …

Member Avatar for sciwizeh
0
128
Member Avatar for joequincy

I'm having one heck of a time trying to match a tag. It looks right to me (and checks out in all of the Regex Tester webapps I've tried) but does not work when I put it to use. The following is the code (with site address and name replaced …

Member Avatar for digital-ether
0
225
Member Avatar for isomillennium

is there a way to tell the occurence postition of the regex given ?? for example .. $text = 'PHP Hypertext Preprocessor'; if (preg_match('xt', $text)){ echo 'Found Match'; } Like in that example occurence position is 11.. I already know about the strpos() .. but that doesnt accept regex .. …

Member Avatar for nav33n
0
132
Member Avatar for Alex Edwards

Whenever I try to declare a "Regular Expression" while including symbols like "+", "-", "*", the match is done based on how those operators work. Now, when I try to use the regex API via combining those operators with backslash or \Q and \E I get the error message-- "...Illegal …

Member Avatar for Alex Edwards
0
121
Member Avatar for Kadence

Is there any difference between regular expressions in C++ and in PHP/Perl? Or can one use the same regular expressions in C++ as in PHP?

Member Avatar for twomers
0
47
Member Avatar for blaater

Hello, Currently I'm working on a funtcion which has to eval() some events from a string i'm injecting into the dom. The problem is that i've tested my regular expression on [url]http://www.regular-expressions.info/javascriptexample.html[/url] and every time it works perfect. Only when I implement it in my website it doesn't work. The …

Member Avatar for blaater
0
102
Member Avatar for devesh9392

Hi guys, i need help extracting e-mail id from the text file can anybody please tell me how can i extract e-mail id and store it in a vaiable using perl regex. (e-mail id is not always bound to end with .com) here is my text file: ****************************************** IQXpert 27(ID) …

Member Avatar for KevinADC
0
162
Member Avatar for hunkychop

i have looked at many regex charts and tutorials but i still cant get preg_match_all do what i need it to do. i need to return this example: [INDENT]param1,$config{}[/INDENT] from this string [INDENT] $new_config{param1,$config{}} [/INDENT] note: none of the data in the string has anything to do with php the …

Member Avatar for hunkychop
0
69
Member Avatar for davidianstyle

Can someone please tell me what's wrong with this? [code]my $time = "12/Jan/2008:13:38"; my ($day, $month, $year, $hour, $minute) = $time =~ /(\d+)\/(\w)\/(\d+)\:(\d+)\:(\d+)/;[/code] I've tried a hundred different things including not escaping the colons, putting parenthesis around ($time...[regex]), splitting up the assignments to $day = $1, $month = $2, etc... …

Member Avatar for jephthah
0
77
Member Avatar for SolTec

here is the code: [code] '//WAN IP Dim url As String Dim myexpression As New Regex("[1-2]?\d{1,2}\.[1-2]?\d{1,2}\.[1-2]?\d{1,2}\.[1-2]?\d{1,2}") Dim MyIPAddress As MatchCollection url = "http:\\www.whatsmyip.com" Dim objWebClient As WebClient = New WebClient Dim objData As Stream = objWebClient.OpenRead(url) Dim streader As StreamReader = New StreamReader(objData) Dim HostIP As IPAddress HostIP = Dns.GetHostEntry(Dns.GetHostName).AddressList.GetValue(0) …

-1
79
Member Avatar for sreelakshmi

Have to convert text(C code) written in richtextBox to Html with automatic syntax highlighting and indention.How can one achieve that using Regex in vb.net. [code] Imports System.IO Imports System.Text.RegularExpressions Public Class Form1 Dim Str As String = "" Dim line As String = "" Dim Keywords() As String = New …

0
58
Member Avatar for Shana8426

Hi I have to create an iterative insert for an avl tree and I have to use enumeration for my balance factors. My enumeration is enum balanceFactor {TILTS_LEFT, BALANCE, TILTS_RIGHT} Please help me. I have been struggling with this for almost 2 weeks. When I enter input such as 20 …

0
57
Member Avatar for asrekdal

Hi, working with the 're' module I am having some difficulty figuring out simple RE. here is the code. p = re.complie('amb') m = p.match("mamba") print m.group() according to the following documents ... [url]http://www.amk.ca/python/howto/regex/regex.html#SECTION000300000000000000000[/url] [url]http://gnosis.cx/publish/programming/regular_expressions.html[/url] there should be a pattern match like... 'amb' but I am getting 'None' back. Can …

Member Avatar for asrekdal
0
153
Member Avatar for Dani

I was wondering if any of you guys know of a good tutorial on regex. I'm able to do most of the simple stuff, but still confused by some of the more advanced pattern matching.

Member Avatar for ~s.o.s~
0
111
Member Avatar for linux

Blah, I hate build errors. Especially when I seem to have all the right dependencies installed. [code]wxw/mAParentFrame.cpp:950: error: variable or field ‘OnAbout’ declared void wxw/mAParentFrame.cpp:950: error: ‘int mAParentFrame::OnAbout’ is not a static member of ‘class mAParentFrame’ wxw/mAParentFrame.cpp:950: error: ‘wxCommandEvent’ was not declared in this scope wxw/mAParentFrame.cpp:950: error: ‘event’ was not …

Member Avatar for linux
0
229
Member Avatar for SheSaidImaPregy

I have created a profanity list and am riding text on a site that contains it. There is also a preview portion (which is below), that tells the user there is a word that is not accepted, and gives them the option to change the word or to continue with …

Member Avatar for majestic0110
0
130
Member Avatar for Kob0724

All this regex stuff has me really confused. How could I just replace all the occurrences of "\\" in a string with "\n"?

Member Avatar for Kob0724
0
134
Member Avatar for gawain_

Hi everybody. Maybe I was able to write a script which takes an input file, strips off part of the anchor tag(<a ....>) and returns a new file. I'd like to know your opinion about the script; it works, but I have the feeling that there is something that can …

0
63
Member Avatar for halifaxer

Hi all, Not even sure if this does belong in this section, but please redirect me if it doesn't. For those of us that have affiliate sites, most affiliates provide us with data feeds or specific data feed url with whcih we can link and extract information for our websites. …

Member Avatar for Walkere
0
100
Member Avatar for halifaxer

I have recieved help over las couple of days with some regex coding. As I'm sure you're aware, with every breakthrough comes another question and I'm stuck on the following [code] $url = 'http://www.islandcosmetics.com/p/Vera-Wang-for-Men-Eau-De-Toilette-Spray-50ml.html'; $html = file_get_contents($url); preg_match('/<div class=\"padding9px\"><p?>(.+?)(\d+\.\d+)?<br \/><strong><span class=\"orange\">(.*)<\/span><\/strong><\/p><\/div>/', $html, $match); $out = $match[2];[/code] This first one is …

Member Avatar for nav33n
0
67
Member Avatar for artisticre

I have a script I got from someone that is running on microsoft ASP. It works for him but the send mail function did not work because I have Chilisoft ASP. I managed to get the send mail part working but the results are not printing on the webpage and …

Member Avatar for SheSaidImaPregy
0
167
Member Avatar for halifaxer

I think I did post this some time ago, but can't find original thread to rehash. I have some questions regarding lifting data from a particular webpage. What makes this unusual and why I need to ask some questions is that within the tags, there is a lot of white …

Member Avatar for nav33n
0
104
Member Avatar for wonder_laptop

Dear All, Since one cannot write the ping command in java because real ping requires ICMP support, and performs a very basic test that there is an IP protocol stake "awake" at the requested address and this is not supported by java. this code is not a "ping" in the …

Member Avatar for wonder_laptop
0
189
Member Avatar for Basanagouda

I am able to Validate for 9.1 decimal Validation by regex expression "[0-9]\{0,9\}\.[0-9]?$" but If I call in KeyPress last character entered cannot be in textBoxVariable.text. Qusetion : I want to do e.handle=true; for keypress , if textBoxVariable.text Value not satisfy regex condition. Any solution? Thanks in advance

0
62
Member Avatar for halifaxer

Hi there, Bit of a complicated query, for me anyway. lol Following code: [code]$url = 'http://www.cheapsmells.com/viewProduct.php?id=6590'; $html = file_get_contents($url); preg_match('/<div class='productOurPrice'?>(.+?)(\d+\.\d+)(.+?)?<\/div>/', $html, $match); $out = $match[2];[/code] Great, no problem! However, this next url I need to code to is a bit trickier as the tag data is, well see below... …

Member Avatar for phper
0
143
Member Avatar for halifaxer

Hola, I am very new to regex and am relying on help from other forumers to help code this. If you think you can teach me (lol) even better. I have an affiliate website that lists products from various external websites. For obvious reasons these products are sometimes out of …

Member Avatar for chrelad
0
69
Member Avatar for meirab

i have an interest in boost/regex library - i need to extract url from a file ----> bookmark.html (from ie6) the regex demo programs use this library - but it is from 2003. when i try to run the program - i get an error: LINK : fatal error LNK1104: …

Member Avatar for meirab
0
205
Member Avatar for kusal

Hi, hope this is the right place, Here is my problem <h4 Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla </h4> I want the content between <h4> tags in a variable, using only one expressions thnx Kusal

Member Avatar for nav33n
0
130
Member Avatar for edek

Hi all! I need to create regex that matches everything before some specified (whole) word. Lets say I need everything before 'have' in such text: What ^7^*#/> I @@3->;: have to do with this *~~@}}], hmm...? ...so I would like to have "What ^7^*#/> I @@3->;: " as a result …

Member Avatar for edek
0
72
Member Avatar for Taffd

Is it possible to include the character < in a regular expression? I don't seem to be able to find a reference to it anywhere and am unable to build a regex with just this one character.

Member Avatar for digital-ether
0
143
Member Avatar for Taffd

Hello everbody, Despite some serious googling, viewing previous posts here and consulting the php manual, I am still unable to validate my user input. If I can get one simple form to validate, I will be able to adapt the script accordingly to any other, so any help you can …

Member Avatar for Taffd
0
194
Member Avatar for edek

Hi all! I need to create regex that matches everything before some specified (whole) word. Lets say I need everything before 'have' in such text: What ^7^*#/> I @@3->;: have to do with this *~~@}}], hmm...? ...so I would like to have "What ^7^*#/> I @@3->;: " as a result …

Member Avatar for edek
0
90
Member Avatar for edek

Hi all! I need to create regex that matches everything before some specified (whole) word. Lets say I need everything before 'have' in such text: What ^7^*#/> I @@3->;: have to do with this *~~@}}], hmm...? ...so I would like to have "What ^7^*#/> I @@3->;: " as a result …

0
54
Member Avatar for cyberdon

I need to find a regular expression in Python. My text string is: 2007-10-12,163.01,167.28,161.80,167.25 I want to extract only the last part: 167.25 (end of line part) I tried using regex="(?=[,].+?(?=[\\n]))" but it did not work. What will be the answer? Thanks!

Member Avatar for woooee
0
78
Member Avatar for Justmehere

I'm using Borland Command Line Compiler and want to use the regexp.h implementation of this header file. Where can I find all available functions and their definitions and maybe samples or examples of how they are used ? Thanks.

Member Avatar for Justmehere
0
129
Member Avatar for tphuynh

Hi , What do I need to modify in the "System.Text.RegularExpressions.Regex.Split(contents, "\\s+", RegexOptions.None);" so the string will also keep whitespaces? For example, in the .dat file you have: Hello Word Test1 Test2 Test3 If you noticed, I have whitespaces between each words, I want to keep that. so string[0] = …

0
63
Member Avatar for rwarrender

Hiya, I'm currently working on a little java program that will scan through a directory, reading php files and then dump out a list of function names for that particular file. Does any one know how I can modify my regex to exclude functions that are inside /* */ comments? …

Member Avatar for rwarrender
0
81
Member Avatar for pkj7461

Hi, My experience in Regex coding is very less. I have been assigned to clean up some data to make it meaningful. I got this data from SQL server: 10/8/2007 5:03:06 PM thakurab *************RECIVED MAIL PQR Start Time: 10/08/07 16:29:09 New PQR State: Assigned Respond Due Date: 10/09/07 00:29:09 The …

Member Avatar for _r0ckbaer
0
110
Member Avatar for visuss

I have been looking for the some best technology that can used for Scrapping. Currenly my project uses Perl:LWP with regex to scrape info. I find a lot of tools running under different platform. E.g. Perl HTML XML Parsers, Java, Jscript, .NET. and many many modules like Hpricot, ,Mechanize, Ruby, …

Member Avatar for kunalsmishra
0
110
Member Avatar for KimJack

Hi All, I am trying to parse an xml file. Not using any of the regex or parsers, simply using only java code. Any suggestions? Thanks

Member Avatar for iamthwee
0
92

The End.