269 Topics

Member Avatar for
Member Avatar for Taruna_1

Hi, I want to replace all the character in my string with 'aaaa' as many number of times as there are occurence of the character. For eg. if my string is "cat", output should be "aaa" and if its "hello" output should be "aaaaa". As of now, I am using …

Member Avatar for vegaseat
0
316
Member Avatar for chris.kelley.5015

Hello, I am trying to create a script that will compare one word at a time from one file to every word in a second file. I know how to design nested for loops to read the first entry in file1 and compare it to every entry in file2, so …

Member Avatar for Watael
0
264
Member Avatar for renierdbruyn

Hi there.... I need help with a regex, I need a regex to check if the qualification types are valid, e.g. Bachelor's degree, Honours degree, National Diploma, B.Tech(BACHELOR OF TECHNOLOGY), etc... I have to check if the user's qualification matches the reqiured qualification. I have: if($user_qualification == $required_qualification){ //do something …

Member Avatar for pritaeas
0
436
Member Avatar for pritaeas

The following code snippet shows how you can parse a DSN (Data Source Name). Why is it useful? You can now pass a single DSN parameter to your database wrapper class' constructor (instead of five separate parameters), and tear it apart into the components you need. The password and port …

1
1K
Member Avatar for pritaeas

For all people having issues building the right regex: I just came across this nice little helper, which allows you to describe what you want using chained methods. https://github.com/jehna/VerbalExpressions

0
120
Member Avatar for prem2

Hi guys, I am struggling with regular expression.Can you please suggest the regular expression for the below patterns. I have tried many times with several patterns but still i could not resolve the below patterns. 1. Must contain at least one alpha character (i.e. a, b, c etc,) 2. Only …

Member Avatar for pritaeas
0
248
Member Avatar for asprin

This is really a spoon feeding request. I'm in the process of learning regex, which will take time to perfect, but as of now I'm in immediate need of help to work on regex expression. Suppose I've a string like $str = "asggasdg46%dgeoweg5.3%sdgeoge4%kge"; In the above string, I need to …

Member Avatar for asprin
0
185
Member Avatar for Jahliah

I'm trying to get the time from input of html txt_URL but the array returns nothing. Not sure where I went wrong. Any help is appreciated. Thanks! **input:** Deleting 11 files. Details: Time Deleted = 01:16:30, Time Left = 00:00:00, **output:** 01:16:30 string before = txt_URL.Value; string after = Regex.Replace(before, …

Member Avatar for Jahliah
0
324
Member Avatar for tekagami

1) onkeyup send textarea values to script 2) converts textarea value to array 3) loops thru the array 4) uses regex to check if its an email address 5) changes inner html of recipient div

Member Avatar for LastMitch
1
365
Member Avatar for somjit{}

my string (str2) = "aaaabbaacc" i wanted to parse out the two a groups. some trials had worked according to plan , while a few , are giving me outcomes i dont understand. im hoping the members could help me out :) problematic regexp 1 : `console.log(str2.match(/a+(a+(?=c))/).toString());` this gives "aa …

Member Avatar for pritaeas
0
161
Member Avatar for baby_c

Hi, I'm currently working on a open source project that will enable the regex library help for the software. I have downloaded the pcre regex library and I know it can be build and run separately. I want to know what are the guide lines and the path which I …

Member Avatar for baby_c
0
201
Member Avatar for Jorox03

I am trying to write some code to regex search against wide strings. The problem I am having is that the regex operations ( `regex_search` in particular ) does not take in wide arguements. Here is the snippet I am having trouble with: Function Header: void scan_filesystem( wpath const& f, …

Member Avatar for Jorox03
0
6K
Member Avatar for Priti_P

I have atext file but I want to pick a phone number from that file. How can I? is there any regex for this? How to write regex which gives output as 10 continuous digits (which will be phone number!)? Other things like what if +91 is addedd and all …

Member Avatar for pritaeas
0
98
Member Avatar for LastMitch

Hi I'm trying figure why I'm getting this error **Undefined offset: 1**. I'm practicing with **list()** function and with a **explode()** function. When I ran the code it kept mention this error: Undefined offset: 1 The line is this: list($bagsize, $candyprice)=explode("#", $_GET["size"]); The list is not an array. It's on …

Member Avatar for LastMitch
0
27K
Member Avatar for professor123

hie i have a php form which will require a user to enter an ID Number in this particular form e.g. 34 1297336 Z 42 how to i create an easy and neat validation for that field. thanks any help will be appreciated!

Member Avatar for professor123
0
159
Member Avatar for debasishgang7

Hi Guys, I am trying to modify an xml string on the fly. I will enter a sample XML string and the code should generate modified xml.I have exploied it later. xml = xml = '''<FixedPage xmlns="http://schemas.microsoft.com/xps/2005/06" xmlns:x="http://schemas.microsoft.com/xps/2005/06/resourcedictionary-key" xml:lang="en-us" Width="793.92" Height="1122.24"><FixedPage.Resources><ResourceDictionary><LinearGradientBrush x:Key="b0" StartPoint="0,0" EndPoint="0,1122.24" ColorInterpolationMode="SRgbLinearInterpolation" MappingMode="Absolute" SpreadMethod="Pad"><LinearGradientBrush.GradientStops><GradientStop Color="#FFFFFFFF" Offset="0" /><GradientStop …

Member Avatar for TrustyTony
0
305
Member Avatar for deadsolo

Hi there everyone, I am having some difficulties getting a regular expression to work. I have a line of text with 5 numbers.I want to ignore the first number, and grab the other 4 numbers. Here is what the text I am dealing with looks like. 1681 12.33754513 7.066246057 6.079261254 …

Member Avatar for deadsolo
0
286
Member Avatar for t1suka

In brief, I am puzzled as to why `~^[0-9]*?\|[0-9]*?\|.*?\|.*?\..*?\|2\|[0-9]\|.*?$~m` matches `1362526368|5|Corinne E. Fischer|fischer.jpg|3|3|FischerC@smh.ca|416-864-5320|1|2|3|4|5` Note the |3| after fischer.jpg when the pattern clearly has a \|2\| in that location. Now I understand that it must be the numbers at the end that are messing with the match but I don't really …

Member Avatar for IIM
0
161
Member Avatar for AleMonteiro

Hello guys, I'm in need of some thinking help. I want to build an auto-complete text input to find cars, but I want it to search for Car Models and Car Manufactor too. In example, if the user type 'For', the suggestions would be 'Ford - Car 1' 'Ford - …

Member Avatar for AleMonteiro
0
248
Member Avatar for scippi

Hi everyone, I am using this method to read in a collection of ints and strings then converting the strings to numbers using the switch statement(as stated by my lecturer) and save it back into an array for further processing. However, everytime it gets to the line studentResponses[row][column] = scanner2.nextInt(); …

Member Avatar for henock
0
406
Member Avatar for swaroop.striker
Member Avatar for shama.shirva
0
3K
Member Avatar for deadsolo

Hi there, I am having some trouble with a regex and am hoping on one of you great folks can assist me. I am very weak with regular expressions just to give you guys a heads up. Here is the text I am using a regex on: Control flow 6881 …

Member Avatar for deadsolo
0
294
Member Avatar for AleMonteiro

Hi everybody. I'm trying to insert an indented code inside another indented code, using the first indentation as base for the second. I mean, the second indentation must begin at the end of the first. The indentation i got working right, but it is adding some undesired line breaks, that …

Member Avatar for AleMonteiro
0
237
Member Avatar for CoilFyzx

*I know that this may seem like a re-occuring question, but I can't seem to find anyone who has asked this question in a very succinct manner. They always seem to beat around the bush, instead of clearly expressing themself.* **Here is the situation:** I have an application called S.M.A.R.T. …

Member Avatar for JamesCherrill
1
371
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
733
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
401
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
325
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
685
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

The End.