306 Topics

Member Avatar for
Member Avatar for ProgramGuy

Hey everyone! Happy New Year! I am trying to hone my programming skills by writing simple applications. I created a very simple currency converter program (hard-coded exchange rates....so nothing special). I first created it as a console app, and then in WPF. Anyway, I ran into an issue with the …

Member Avatar for ProgramGuy
0
742
Member Avatar for krystosan

I am learning re module for practice I have taken an export of my phone addressbook which is a comma seperated text file, containing "First Name","Mobile Phone","Home Phone","Company","E-mail Address","Company Main Phone","Business Fax","Birthday" as of now I am more interested in First name , mobile phone number and email address. in …

Member Avatar for snippsat
0
405
Member Avatar for singularity~

I'm trying to find two cases in a test string. _Large and jpeg Here is my string : E:\Music Test Folder\Lamb of God\Wrath\AlbumArt_{F5969BAB-11BC-49E0-9B56-B6E9654204B7}_Large.jpeg And here is my expression: Match large = Regex.Match(file, @"^.*(_Large).(jpeg)$/i", RegexOptions.IgnoreCase); I cannot get a match. What am I doing wrong?

Member Avatar for singularity~
0
327
Member Avatar for waleed.makarem

Dear Experts, I have one simple question , and forgive me , I know it is simple , but I am very bad in regular expression. I have a text which represent time interval , eg [1-5] , ie , the start time is at 1 and ends at 5 …

Member Avatar for Reverend Jim
0
707
Member Avatar for jay nadeem

hi friends. i want to try the fee collection system in vb.net. my need is that a reminder remind me the name of defaulters on 20th date of every month. it check the defaulters from database. please hlep me frinds how can i do this.

0
88
Member Avatar for end3r

Hi, I have a string like this: ABC_STRING_DEF_GHI_JKL. Where the "STRING" part is constant. I am trying to get its corresponding regex pattern. Something like %_STRING_%_%_% So far I managed to get to this point: SELECT 1 FROM DUAL WHERE REGEXP_LIKE('abc_STRING_def_ghi_jkl', '(^(\w[^_])+)_STRING_([^_]+)_([^_]+)_([^_]+)$'); It's not really working, so if you have …

Member Avatar for pritaeas
0
133
Member Avatar for Dani

I've been really struggling with regex lately ... I never quite got the hang of it. I'm currently hung up on trying to match on the following in my .htaccess file: ^foo/([A-Za-z0-9]+)/([0-9]+)$ The catch is that I want the alphanumeric string to *NOT* be one of a short list of …

Member Avatar for BigPaw
0
204
Member Avatar for samiyahg

Hi, I need help in writing a regular expression accoding to the following criteria: preg_match (keywords tel/contact/phone/phne/telephone which can be found anywhere in the string) followed by 7 int(numbers). Thnx, Regards, Sami

Member Avatar for samiyahg
0
205
Member Avatar for divyakrishnan

Hi... I am using following query to get data from a table *select * from emp where ename regexp 'rajkiran'* It will return only the rows with ename=rajkiran but I want to select all the rows with ename =raj kiran & ename=rajkiran using a single query

Member Avatar for pritaeas
0
156
Member Avatar for tpickett

I am developing a script that takes an article, searches the article for a "keyword" and then randomly replaces that keyword with an anchor link. I have the script working as it should, however I need to be able to have an array of "replacements" for the function to loop …

Member Avatar for tpickett
0
211
Member Avatar for Dino000

Hello. I've been through dozen of tutorials about regex, and obviously still don't understand everything. I'm trying to get data (a whole DIV field and its contents) from another website, and display it on my page. It seems to get everything, but the DIV field. This is what I want: …

Member Avatar for LastMitch
0
292
Member Avatar for deadsolo

Hi, I need help creating or manipulationg my current regex that will grab two numbers from a line, while excluding a specific number. Here is an example of what the line will look like: "In our tests, downloads on port 6881 achieved up to 12059 Kbps while downloads on port …

Member Avatar for deadsolo
0
180
Member Avatar for dancks

I am making a basic craigslist type website with a search function. There is a field where you can enter what you think the name of the product might be and my search function is supposed to find names of products that match. so for example a user can enter: …

Member Avatar for diafol
0
349
Member Avatar for daniel36

i am having the code if (eregi($file,$_SERVER["HTTP_ACCEPT_LANGUAGE"]) && !$use_lang) $use_lang = $file; This line of code is giving error:-Deprecated: Function eregi() is deprecated in C:\xampp\htdocs\spm\includes\header.php on line 15

Member Avatar for pritaeas
0
155
Member Avatar for deadsolo

Hi, I am currently working on a script that will compare two numbers from a file. I am thinking that I need to use a regular expression in order to get the numbers, however I don't know what the regex would be since there are multiple numbers through out the …

Member Avatar for deadsolo
0
294
Member Avatar for LastMitch

Hi I'm bit stuck on how to put a period in array. This is my example: <pre> <?php $str = 'I like to eat Strawberry Cheesecake.'; $words = preg_split('@([\W]+)@', $str); var_dump($words); ?> </pre> This is how it's `var_dump()`: array(7) { [0]=> string(1) "I" [1]=> string(4) "like" [2]=> string(2) "to" [3]=> …

Member Avatar for LastMitch
0
259
Member Avatar for jamojo

Hello Everyone. Can you please advise how can I replace a string from this "[" to "]" this character and replace it with blank string? I believe I will use str_replace but I am having a hard time doing this. The quick brown fox jumped over [caption id="attachment_223" align="alignleft" width="900"] …

Member Avatar for jamojo
0
163
Member Avatar for klemme

I have this pattern which finds links, inside a text string from file_get_contents function. Works fine, it seems. But I am curious to understand the expression, each charachter of it, what it does etc. Here you go: preg_match_all('~href=("|')(.*?)\1~', $var, $out); I know what it does obviously, but what does (.*?)\1~ …

Member Avatar for klemme
0
183
Member Avatar for divyakrishnan

Hi.. I used following regular expression "/^[0-9]{1,2}\-\[0-9]{1,2}\-\[0-9]{4}$/" for email validation. It won't check the mail id like "testmail@gmail" . It will work "testmail@gmai" Can anybody suggest solution for this?

Member Avatar for pritaeas
0
79
Member Avatar for krystosan

Hello I am trying to build a function that i can use in to search for an object or item from its name, Here is what I have in **sfind.py** def findobj(searchTxt,items): """ This function will help you find an object or an item from list of items passed to …

Member Avatar for krystosan
0
155
Member Avatar for andyy121

hi everybody i just need to know what is the function of preg_split and that which is inside of brackets: $keywords = preg_split ('/[\s]+/',$keywords);

Member Avatar for andyy121
0
155
Member Avatar for mktrx

Hi all, hope you are having a better day than I am... I am trying to write the results of a search of text using preg_match_all to a database... First thing I need to do is write the results of the search to an array (which preg_match_all does)... It writes …

Member Avatar for mktrx
0
106
Member Avatar for pritaeas

Recently bought "Regular Expressions Cookbook 2nd ed." and wanted to share my findings. The book is divided into two parts. The first part (3 chapters) describes tools, skills and programming. The tools chapter shows you what's out there (including his own software). The skills chapter is a tutorial. It describes …

Member Avatar for pritaeas
1
248
Member Avatar for kshahnazari

I have a simple question about regular expression and Im new to php so sry about my bad questions , what is the meaning of ^ and $ in regular expression and please give examples that if we dont put them it will go wrong . thank you

Member Avatar for kshahnazari
0
171
Member Avatar for Ghost

Hi guys! I've been using PHP for fun for a while, and now I'm interested in playing with some scraping. I know regex is the way to go. So I'm trying to scrape a page of 4chan. I want to grab the images and the title of the thread of …

Member Avatar for diafol
0
238
Member Avatar for diafol

Hi all. AM having a little issue with regex. Not one of my strongest skills! I'm trying to produce a simple translation system that doesn't require arrays, gettext etc. It basically has this structure: $content=<<<CONTENT <p>{{Dyma destun||Here's some text}}</p> ... CONTENT; So the page content is held in a var …

Member Avatar for diafol
0
310
Member Avatar for caven.chunyen

Hi, I've got a set of folders with each contain many files. I need to extract a specific file extention(.sof) from each of these folders to a new directory(or the same directory in a new folder). Any help is appreciated. Thanks.

Member Avatar for extension wpd
0
306
Member Avatar for grant.baker

Hi I'm working on a form validation script. Up to this point, I've only written very basic regex validations. The input that I'm trying to validate should have entries in the following format AAA111 separated by comma space. So some sample entries are : `ABC111` or `ABC111, ABC112, ABC113`. Here's …

Member Avatar for grant.baker
0
287
Member Avatar for sarelnet

Hi, I have a HTML page in one variable. I need build a mehod that will extract a tag content (dif extract_tag(self, tag_name)). For example, given webpage: <div id="mw-page-base" class="noprint"></div> <div id="mw-head-base" class="noprint"></div> <!-- content --> <div id="content" class="mw-body"> <a id="top"></a> <div id="mw-js-message" style="display:none;"></div> <!-- sitenotice --> <div id="siteNotice"><!-- centralNotice …

Member Avatar for ryantroop
0
252
Member Avatar for liezlardo

I have the following code. I wanted to determine if the value inputted in $cellno (from a textbox) are all digits (numbers), and if it's 11 numbers, and if its starting numbers are "09". One correct value example is 09345678910. It is all numbers, has 11 digits, and begins in …

Member Avatar for liezlardo
0
179

The End.