Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- #https://affy.blogspot.com/p5be/ch10.htm
- $example_replcd1 = $example_string1 = "/valami/akarmi/ezaz.html";
- $example_replcd2 = $example_string2 = "/valami/akarmi/css";
- $example_replcd3 = $example_string3 = "/css/valami/akarmi/ezaz.css";
- $example_replcd4 = $example_string4 = "/valami/akarmi/js";
- $example_replcd5 = $example_string5 = "/js/valami/akarmi/ezaz.js";
- $example_replcd6 = $example_string6 = "/valami/akarmi/img";
- $example_replcd7 = $example_string7 = "/img/valami/akarmi/ezaz.img";
- #$match1 = $example_string1 =~ m/^(.*)$/;
- #$match2 = $example_string2 =~ m/^(.*)$/;
- #$match3 = $example_string3 =~ m/^(.*)$/;
- #$match4 = $example_string4 =~ m/^(.*)$/;
- #$match5 = $example_string5 =~ m/^(.*)$/;
- #$match6 = $example_string6 =~ m/^(.*)$/;
- #$match7 = $example_string7 =~ m/^(.*)$/;
- $match1 = $example_string1 =~ m/^(?!\/css\/|\/img\/|\/js\/)(.+)$/;
- $match2 = $example_string2 =~ m/^(?!\/css\/|\/img\/|\/js\/)(.+)$/;
- $match3 = $example_string3 =~ m/^(?!\/css\/|\/img\/|\/js\/)(.+)$/;
- $match4 = $example_string4 =~ m/^(?!\/css\/|\/img\/|\/js\/)(.+)$/;
- $match5 = $example_string5 =~ m/^(?!\/css\/|\/img\/|\/js\/)(.+)$/;
- $match6 = $example_string6 =~ m/^(?!\/css\/|\/img\/|\/js\/)(.+)$/;
- $match7 = $example_string7 =~ m/^(?!\/css\/|\/img\/|\/js\/)(.+)$/;
- $replc1 = $example_replcd1 =~ s/^(?!\/css\/|\/img\/|\/js\/)(.+)$/found/;
- $replc2 = $example_replcd2 =~ s/^(?!\/css\/|\/img\/|\/js\/)(.+)$/found/;
- $replc3 = $example_replcd3 =~ s/^(?!\/css\/|\/img\/|\/js\/)(.+)$/found/;
- $replc4 = $example_replcd4 =~ s/^(?!\/css\/|\/img\/|\/js\/)(.+)$/found/;
- $replc5 = $example_replcd5 =~ s/^(?!\/css\/|\/img\/|\/js\/)(.+)$/found/;
- $replc6 = $example_replcd6 =~ s/^(?!\/css\/|\/img\/|\/js\/)(.+)$/found/;
- $replc7 = $example_replcd7 =~ s/^(?!\/css\/|\/img\/|\/js\/)(.+)$/found/;
- print("\$match1 = $match1\n");
- print("\$match2 = $match2\n");
- print("\$match3 = $match3\n");
- print("\$match4 = $match4\n");
- print("\$match5 = $match5\n");
- print("\$match6 = $match6\n");
- print("\$match7 = $match7\n");
- print("===\n");
- print("\$replc1 = $replc1\n");
- print("\$replc2 = $replc2\n");
- print("\$replc3 = $replc3\n");
- print("\$replc4 = $replc4\n");
- print("\$replc5 = $replc5\n");
- print("\$replc6 = $replc6\n");
- print("\$replc7 = $replc7\n");
- print("\$example_string1 = $example_string1\n");
- print("\$example_string2 = $example_string2\n");
- print("\$example_string3 = $example_string3\n");
- print("\$example_string4 = $example_string4\n");
- print("\$example_string5 = $example_string5\n");
- print("\$example_string6 = $example_string6\n");
- print("\$example_string7 = $example_string7\n");
- print("===\n");
- print("\$replaced_string1 = $example_replcd1\n");
- print("\$replaced_string2 = $example_replcd2\n");
- print("\$replaced_string3 = $example_replcd3\n");
- print("\$replaced_string4 = $example_replcd4\n");
- print("\$replaced_string5 = $example_replcd5\n");
- print("\$replaced_string6 = $example_replcd6\n");
- print("\$replaced_string7 = $example_replcd7\n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement