You are here: Technology, Web & Business Forum
: Web Development
: Programming
:
Perl ....how to write it correctly with Perl ?!?
|
Welcome to the Technology, Web & Business Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| Programming Discuss programming languages such as .NET, PHP, PERL, ASP, ColdFusion, C++
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
|||
I must find "Remove colour consent form" or "do not send colour consent form to author"; or "remove CCF form"
And "Special Issue" and "remove CCF form" sentences in *.xml file. how to write it correctly with Perl ?!
__________________
Powered by Yahoo! Answers |
|
|||
|
|||
$line =~ /(remove|(do not send)) <br />c(olour\s)?c(onsent\s)?f(orm\s)?<br />
(form\s)?(to\sauthor)?/i; <br /> The above will match everything listed except for "Special Issue", hopefully that will be easy enough. You can use this if you want to just treat the file like a text file. If you are using one of the xml modules to parse the file, there might be easier ways to find the lines you've listed. Try searching on cpan.org for xml. The question is pretty open as to the approach being taken, and if you've been around Perl much, you know TIMTOWTDI.
__________________
Powered by Yahoo! Answers |



Linear Mode
