Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Browse by Tags

All Tags » Perl
  • Replacing text with matched text from same string

    Hello, I need help on matching and replacing text with different matched text from same string. My goal is to be able to batch process a large set of text files that each have similar patterns and replacement criteria. Below is an example of a typical case. In the example below, BOLD text replaces strikeout text: TITLE: Beautiful Losers - ...
    Posted to Construction Advice (Forum) by dhl on August 15, 2008
  • Re: Using Itunify to Edit Tracks. Really NEED HELP!

    #!/usr/bin/perl -w $text = "Ace of Base - All That She Wants (1993)"; if($text =~ m/^([^-]+)\s*-\s*(.*)$/) {   print "$1\n";   print "$2\n"; }
    Posted to Construction Advice (Forum) by prometheuzz on April 27, 2008
  • Perl v. MySQL

    I have a regex which works in Perl, but not in Mysql and I was wondering what might be causing the problem. Here it is: ([KR-]\.[^KR]*?[KR][\@|\#]([^KR]*?[KR][\@|\#])*\.)|([KR-]\.[^KR]*?[KR][\@|\#]([^KR]*?[KR][\@|\#])*[^KR]*?\.\-)|([KR-]\.([^KR]*?[KR][^\@|\#])*[^KR]*?[KR]+\.)|([KR-]\.([^KR]*?[KR][^\@|\#])*[^KR]*?\.\-)The error that it gives is ...
    Posted to Platform Differences (Forum) by ternto333 on February 22, 2008
  • Matching email with blank subject/body, and attached PDF

    I'm trying to use Trend Micro's Security Dashboard to filter a lot of spam we've been getting that is in the following form:   From: various crap email addresses (different every time) To: various internal email addresses Subject: blank, or occasionally containing one word Body: always blank Attachment: A small pdf file of ...
    Posted to Construction Advice (Forum) by brian0918 on July 26, 2007
  • Various ways to control single-line multi-line for PERL html-parsing?

    I am doing parsing of html to pick up url's with url-titles from web-pages using PERL (actually I am using a Perl-script not made by me that takes url-adresses and regexps as input to produce  links from the wanted site). I often get problems related to controlling matching patterns in single lines vs multiple lines. Sometimes I always ...
    Posted to Construction Advice (Forum) by borgeh on July 11, 2007
  • Re: Matching text in email header only if one string does NOT match

    Now you've done it. You made me try my rusted Perl skills again. I wrote a little script for testing the pattern: #!/usr/bin/perl use warnings; use strict; my $sender = shift || die "Need a sender email address!\n"; my $header = "From: Xxx Yyy <$sender> Subject: Something To: Aaa Bbb <aaa_bbb\@zzz.com> ... ...
    Posted to Construction Advice (Forum) by eSquire on May 8, 2007
  • Re: Matching text in email header only if one string does NOT match

    Sergei is of course right. You can use the or operator (|) within the forward assertion. I don't think there's a performance difference, but it looks nicer this way. About setting the modifiers:  You stated that Perl was "somehow" involved in the process, but I don't know how you pass the regular expression to the ...
    Posted to Construction Advice (Forum) by eSquire on May 7, 2007
  • how to match an A3D on A1BA2CA3DA4E

    Hi All, I'm new to this forum. I use perl to do the regex, and AFAIK, regex do the parsing from left to right, so if I use /A.*?D/  on  A1BA2CA3DA4E, the matched result will be A1BA2CA3D so what is the regex to match an example case A3D on A1BA2CA3DA4E, Note : The numbers in between (1,2,3) is only an example for any character ...
    Posted to Construction Advice (Forum) by bayu on December 26, 2006