Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Urgent need a java regex pattern

  1. #1
    Junior Member
    Join Date
    Apr 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Urgent need a java regex pattern

    Hello,
    Need a pattern for the problem. please check the last comment in the below link

    Java Programming - ***Need Regex for a pattern


    its urgent. Any assistance is highly appreciated.


  2. #2
    Junior Member
    Join Date
    Apr 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Urgent need a java regex pattern

    Hello,

    I have got a solution for JS and HTML files

    HTML pattern to identify all the comments :
    \\<![ \\r\\n\\t]*(--([^\\-]|[\\r\\n]|-[^\\-])*--[ \\r\\n\\t]*)\\>

    JS Pattern to identify all the comments (single, block..etc)
    (?:/\\*(?:[^*]|(?:\\*+[^*/]))*\\*+/)|(?://.*)

    So, here i will remove all the commented code and then, find the pattern (object.device.load...) in the uncommented code. Its easy to find it.

    Thanks for all your valuable inputs.

Similar Threads

  1. [SOLVED] Need Regex for a pattern
    By mallikarjun_sg in forum Java Theory & Questions
    Replies: 7
    Last Post: May 5th, 2010, 02:06 AM
  2. [URGENT] - Problem accessing web sites with Java!
    By jguilhermemv in forum Java Networking
    Replies: 0
    Last Post: March 5th, 2010, 04:43 PM
  3. Urgent Help needed with java codes
    By makarov in forum Java Theory & Questions
    Replies: 0
    Last Post: November 13th, 2009, 07:23 AM
  4. url pattern issue - please help me...
    By bharathik in forum JavaServer Pages: JSP & JSTL
    Replies: 2
    Last Post: November 9th, 2009, 04:28 AM
  5. [SOLVED] Java Regular Expressions (regex) Greif
    By username9000 in forum Java SE APIs
    Replies: 4
    Last Post: June 11th, 2009, 05:53 PM