Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

perl

0
votes
0 answers
40 views

Match everything not in tag <div>

I need regex that will match everything not in tag. For example: foobar<p>lol</p><div>something</div>blahblah Should match…
asked June 25, 2011 6:22 am CDT
anonymous
0
votes
0 answers
24 views

Perl and regex to extract a path

I have a block of text/code where I need to search for include= and then grab the entire path after the '=' I've tried several ways and I just can't…
asked June 25, 2011 12:16 am CDT
Mr Brimm
2
votes
0 answers
31 views

Beginner perl issue

so i have this: for $i (0..@parsedText) { if ($parsedText[$i] =~ /\s{20}<a href/) { my $eventID = $parsedText[$i]; my $eventLink =…
asked June 23, 2011 4:09 pm CDT
Aelfhere
0
votes
0 answers
36 views

DBI begin_work doesn't work with stored procedure calls

I am trying to make a call to a stored procedure from with in a transaction in its simplified form: my $dbh= DBI->connect(............ ); my $sth…
asked June 23, 2011 8:28 am CDT
LAJ
1
vote
3 answers
31 views

Determining if a URI is valid using Perl regex

For an application I'm developing I need a Perl script which loops through a massive CSV file and ensures that every single line contains a valid…
asked June 22, 2011 10:32 pm CDT
steven_desu
1
vote
2 answers
25 views

Perl regex variable with slashes

I need a perl regex to check if $currentSearch is present in $currentLine. The check should include that $currentLine has "Load" keyword in it.…
asked June 22, 2011 3:45 pm CDT
user391986
1
vote
3 answers
25 views

Perl regex help -- hopefully an easy question

ashamed as I am to admit it, I'm terrible with regex... so here I am to ask your help :) i have an html file that looks sorta like this:…
asked June 22, 2011 11:40 am CDT
Aelfhere
0
votes
1 answer
29 views

More elegant solution to remove items from a batch of files?

Okay, this is more for my own learning than actual need. I have files with the following format: Loading parser from serialized file…
asked June 22, 2011 10:33 am CDT
Jon
0
votes
3 answers
42 views

Simple perl split() and Regular Expression question

I am attempting to take a CSV file and import each row into an array (where each element represents a column). The format of a CSV file is very…
asked June 21, 2011 9:10 pm CDT
steven_desu
1
vote
2 answers
38 views

Replacing empty overlapping values in a CSV file

I have a line of text like: value,value,,,value,value I want the two empty values to be replaced with a different value. Something like:…
asked June 21, 2011 3:28 pm CDT
Steve Prentice
3
votes
6 answers
34 views

Perl regex substitute from hash

Is there an efficient way to substitute a bunch a strings using values from a Perl hash? For example, $regex{foo} = "bar"; $regex{hello} = "world";…
asked June 21, 2011 2:34 pm CDT
psaccounts
0
votes
1 answer
30 views

Perl Regex remove c comments with specific keywords

I have text like so: /* blah blah blah blah */ /* blah blah blah jjj blah blah*/ /* blah blah*/ /* blah jjj blah blah */ /* blah blah*/ I'd like to…
asked June 20, 2011 3:59 pm CDT
Jack
0
votes
1 answers
38 views

Perl socket as (pseudo)http server break with ftp request!

The following code is a (pseudo!) http server. It just sends back the http request. The unexpected comportment occurs with ftp requests from…
asked June 20, 2011 3:55 pm CDT
cirne100
-2
votes
2 answers
26 views

Non greedy regex matching in sed/perl

I was doing sed /http.*.torrent/s/.*(http.*.torrent).*/\1/;/http.*.torrent/p 1.html to extract links. However since sed lacks non-greedy quantifier…
asked June 20, 2011 12:42 pm CDT
ccvcn
0
votes
3 answers
32 views

Adding one to matched number in substitution regex

I have a file full of C++ code which is a bunch of small functions that return a number. I am trying to replace each number with the number plus one…
asked June 20, 2011 12:05 pm CDT
Seth Carnegie
3
votes
3 answers
30 views

Expanding [optionals] in text

Note: I have answered my own question. The solution is appended at the end of this question. Cannot self-answer, so it's the best I could do.…
asked June 20, 2011 9:23 am CDT
YGomez
2
votes
3 answers
37 views

What does \D do in Perl regular expressions.

In some code I am maintaining, I have found the expression: $r->{DISPLAY} =~ s/\Device//s; What surprises me is that it matches both device and…
asked June 20, 2011 7:13 am CDT
Roger
-2
votes
0 answers
23 views

Sometime request not have a response headers (white screen)

Sometime request not have a response headers, become white screen and no error status (200) Did anyone know to fix this?
asked June 19, 2011 10:33 am CDT
akongz
0
votes
4 answers
32 views

Replace newlines within quoted string with \n

I need to write a quick (by tomorrow) filter script to replace line breaks (LF or CRLF) found within double quoted strings by the escaped newline \n…
asked June 19, 2011 9:07 am CDT
davka
0
votes
1 answer
31 views

Trying to get perl output json data under a parent

Here is my code #DATA SOURCE NAME my $dsn = "dbi:$platform:$database:$host:$port"; #PERL DBI CONNECT my $connect = DBI->connect($dsn, $user, $pw)…
asked June 19, 2011 5:43 am CDT
Xinier
Pages : 1 | 2 | 3 | 4 | 5 > [28]
544

perl

Tagged: perl
Related Tags
regex × 344
mysql × 81
apache × 46
http × 20
cgi × 18
php × 18
dbi × 17
python × 16
linux × 12
bash × 11
ftp × 10
sqlite × 10
arrays × 9
lwp × 9
sed × 9
matching × 9
string × 8
utf-8 × 8
java × 8
mod-perl × 7
split × 7
pattern × 7
parsing × 7
https × 7
match × 6
grep × 6
ssl × 5
chinese × 5