Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Scripting >> Perl >> how to extract a specific substring from a bigger string

Example 1. To extract the size in bytes part of the following string $string = "Document 1342, Microsoft Word - application form-CUHK.doc owned by CLGSONG was printed on cclcgo4 via port 155.69.50.247:RAW. Size in bytes: 531829; pages printed: 0" $bytes = $string; $bytes =~ s/.*Size.in.bytes[:].(.*)[;].*//; print $bytes;
[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]