- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Extracting data in between strings...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-03-2008 11:20 AM
тАО01-03-2008 11:20 AM
When i print the content it gives me this:
his page is used to hold your data while you are being authorized for your reque
st.
You will be forwarded to continue the authorization process. If this
does not happen automatically, please click the Continue button below.
I want to print everthing between START and END and then reassign it to my WebJump variable.
Any ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-03-2008 01:03 PM
тАО01-03-2008 01:03 PM
Re: Extracting data in between strings...
http://www.wellho.net/forum/Perl-Programming/return-part-of-a-string-that-matches-a-pattern.html
like this:
$WebJump =~ /START(.*)END/;
print "We got $1 out of that!\n";
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-03-2008 01:43 PM
тАО01-03-2008 01:43 PM
Re: Extracting data in between strings...
I assume from the content that you truly want everything between the strings START and END, disregarding any newline boundries.
Using a copy-and-paste of your data :
# echo ${WebJump}|perl -000 -nle 'print $1 if m/.*START(.*)END.*/s'
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2008 02:21 AM
тАО01-15-2008 02:21 AM
SolutionWhere-ever the variable 'WebJump' has this value, use the following lines in your perl script:
if($WebJump =~ /START(.*)END/s) {
print "Stuff between 'START' and 'END': $1\n"
}
- Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2008 06:58 AM
тАО01-31-2008 06:58 AM
Re: Extracting data in between strings...
# Open Cookie Object
my $cookie_jar = HTTP::Cookies->new(
file => "/adminweb/usm/tlrs/cookies.t",
autosave => 1,
);