| | |
Need basic parsing/regex help
Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
![]() |
I'm new to perl (and actually not even really trying to develop this skill - I inherited some code and am trying to enhance it).
Basically, I want to get the text between parts of a text string.
How do I get the parsed variable to contain "WHATEVER IT IS"?
Basically, I want to get the text between parts of a text string.
How do I get the parsed variable to contain "WHATEVER IT IS"?
Perl Syntax (Toggle Plain Text)
#!/usr/bin/perl $var="BLAH{108:WHATEVER IT IS}HEY"; $parsed=($var =~ /\{108:(\w*)\}/); print "PARSED:$parsed\n";
Last edited by winbatch; Mar 13th, 2007 at 9:23 pm.
Worked like a charm. Thanks! (Maybe some day I'll understand it)
![]() |
Similar Threads
- Parsing html form. (PHP)
- xml parsing from java (Java)
- can I get a title from an html header tag? (PHP)
- code parsing (VB.NET)
- another newbie with alot of redhat and apache server Q'S (Linux Servers and Apache)
- Visual Basic.net (VB.NET)
Other Threads in the Perl Forum
- Previous Thread: Submit using Perl
- Next Thread: What are .pm files from .pl files
| Thread Tools | Search this Thread |





