The Artima Developer Community
Sponsored Link

Java Answers Forum
Regex for a pattern

1 reply on 1 page. Most recent reply: Apr 27, 2010 11:03 PM by malli sg

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
malli sg

Posts: 2
Nickname: malli2010
Registered: Apr, 2010

Regex for a pattern Posted: Apr 26, 2010 9:09 PM
Reply to this message Reply
Advertisement
Hello,

I need a pattern for the following use cases: I am using Java

1. var so = nokia.device.load('abc','abc');
2. var so = nokia.device.load("abc","abc");
3. var so = nokia.device.load("abc");
4. var so = nokia.device.load('abc');
// 5. var so = nokia.device.load('abc'); (Line is commentted)
/*
function init()
{
if (window.menu) {
// set tab-navigation mode and hide softkeys
widget.setNavigationEnabled(false);
var so = nokia.device.load("abc");(Line is commentted)
}
*/

I need a regex pattern which will be give me only the function statments which are listed in bold and NOT italic format function statements as those statements are commented.

Basically, the pattern should give me the statments which are not commented.
Please help me, its urgent.

Thanks,
Mallikarjun.


malli sg

Posts: 2
Nickname: malli2010
Registered: Apr, 2010

Re: Regex for a pattern Posted: Apr 27, 2010 11:03 PM
Reply to this message Reply
I have got answered in other forum. Pattern is ^var *.*nokia[.]device.*[)] *;$

Thank you..

Flat View: This topic has 1 reply on 1 page
Topic: Java Conference in Europe Previous Topic   Next Topic Topic: Would you welcome a new book on Agile with Java?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use