User Profile

Collapse

Profile Sidebar

Collapse
rampdv
rampdv
Last Activity: Mar 5 '13, 02:15 PM
Joined: Feb 8 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Hi keydrive
    Here i provide the solution to u r example document using regular expression in perl.
    Here i read a file data word by word and push that data into array and print the first value of the array

    if u have any doubts or find any error in code please make a follow up
    Code:
    open(alpha,"alphastring.txt");
    
    while(<alpha>){
    
    while($_ =~ /([a-zA-Z]+)/ig) {
    ...
    See more | Go to post

    Leave a comment:


  • rampdv
    replied to count same HTML tags using regex in perl
    in Perl
    Hi techtween,
    find the code below this is working fine,to count the html tags based on the tag name using regular expressions.

    here i used below html code to check
    <html>
    <h1>hi this is ramanjaneyulu</h1>
    <b>this is bold text</b>
    <br/>
    <br/>
    <body>this is the body of the html</body><body> this is another body</body>...
    See more | Go to post

    Leave a comment:


  • rampdv
    replied to grep multiple commands
    in Perl
    Hi i am providing the answer using Perl programming,can u just check u r language also,there must be a split command ,u use that command u get output as u required manner.

    Code:
    $var="command -1:command -2*: command something*";
    @commands = split(/:/,$var);
    foreach $comm (@commands) {
    
    print " $comm \n ";
    }
    if there is any chance don't have any split funtion in u r language...
    See more | Go to post
    Last edited by Rabbit; Mar 1 '13, 04:37 PM. Reason: Please use code tags when posting code.

    Leave a comment:


  • Hi below code working fine to count the tags based on the html tag name .but i am using below html file for this if u have any doubts please post u r html file here ,i will provide the regular expression based on u r html code

    Code:
    <html>
    <h1>hi this is ramanjaneyulu</h1>
    <b>this is bold text</b>
    <br/>
    <br/>
    <body>this is the body of the html</body><body>
    ...
    See more | Go to post
    Last edited by Rabbit; Feb 26 '13, 06:43 PM. Reason: Please use code tags when posting code.

    Leave a comment:


  • rampdv
    started a topic how to retrieve array data using for loop in perl?
    in Perl

    how to retrieve array data using for loop in perl?

    hi i have an array,i want read data using for loop,i tried below manner ,but i am getting first value all times.can any one suggest is there anything wrong in my syntax.
    Please don't use foreach loop if u want to use foreach just provide how to read each value based on loop iteration count.
    Code:
    @a = qw(ashd asda asdhas ahsdhasd ahsdhasd hdj dssd sdd sdjdh);
    
    for($i=0;$i< $#a;$i++) {
    print " $a[i] \n";
    ...
    See more | Go to post
    Last edited by Rabbit; Feb 26 '13, 06:41 PM. Reason: Please use code tags when posting code.

  • i would like to count the tags how many times each tag exists in the html file.Above i wrote code to retrive the each tag and placed into an array.Because it is easy to count how many times each tag name exist with in the array.so please help me above problem.array is not an mandatory,so please provide the regular expression how to read each tag and display how many times each tag exist in html file

    Please provide the regular expression...
    See more | Go to post

    Leave a comment:


  • how to display the count of html tags based on tag name using regular expression?

    Code:
    <html>
    <head>
    </head>
    <h1>ghfghfgh</h1>
    <body>
    ghjhjg hghjgjk
    fghfjh hjkhkjl
    <b>jhjkhjk</b><b>uyyjhyu</b>
    <br/><br/>
    <p>this is paragraph</p>
    <p>this is paragraph1</p><p>this is paragraph2</p>
    </body>
    </html>
    i am trying using below code

    first...
    See more | Go to post
    Last edited by acoder; Feb 14 '13, 02:02 PM. Reason: Please use [code] tags when posting code
No activity results to display
Show More
Working...