Results 1 to 2 of 2
  1. #1
    grundig1988 is offline Member
    Join Date
    Nov 2012
    Rep Power

    Default Regex/Selector with Java

    Evening all,

    Apologies in advance - I am an absolute amateur with both Java and Regex/Selector, so if I am a little unclear in explaining myself please forgive me.

    I am trying to monitor a webpage for changes, which I believe is largely Javascript-programmed. I have the option of using either 'Selector' or 'Regex' to monitor the website. The problem is that in this case the use of Regex/Selector isn't so simple (to me), because of the Javascript on the page.

    If I highlight the entire page, the 'Selector' Text for the part I want to create a Regex/Selector expression for is as follows:

    <div class="pagi" id="pages" style="display: none;"><strong>Results <span id="pages_count"></span></strong></div>

    The actual text for the 'pages_count' element is "Results 1-50 of 776". Usually I would just use the simplest of expressions and do something like \b776\b i.e. if the number changed, I would be informed. This is probably highly inefficient, and I am sure there are much easier ways of doing this, but as I said, I am an amateur! In this case however the 'Pages_count' section that I would like to monitor with Regex/Selector remains constant, although the underlying data itself i.e. the actual number, in this case 776 is changing due to the Java. Is there a way of using either a Selector/Regex statement to monitor the underlying 'Pages_count' data itself, because currently the data is ever-changing, but because the 'Pages_count' statement itself remains constant, I am not informed of any changes that are made. In what way could I use a Regex/Selector statement to be informed if the 776, changes to 777, for example.

    I have searched high and wide for a solution, but the fact that I am an amateur with this most probably hasn't helped me. I do hope however that someone on this forum might be able to help me.



  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Regex/Selector with Java

    What does this have to do with Java?

    Note that JavaScript is NOT Java.

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. in IPV6 only environment
    By thanhise in forum Advanced Java
    Replies: 0
    Last Post: 10-25-2012, 04:45 AM
  2. Java RegEx problem, need help
    By shin_orochi in forum Advanced Java
    Replies: 15
    Last Post: 03-13-2012, 08:48 PM
  3. How to work with REGEX in Java
    By new_Java in forum New To Java
    Replies: 2
    Last Post: 03-31-2011, 04:19 AM
  4. method selector error
    By javaprobie in forum New To Java
    Replies: 3
    Last Post: 01-25-2011, 03:11 PM
  5. RegExPlus - Java regex library
    By CodesAway in forum Java Software
    Replies: 5
    Last Post: 02-28-2010, 08:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts