Solved

regular expressions in jedit: matching whitespace and returns

Posted on 2004-08-20
7
406 Views
Last Modified: 2013-12-14
Hi,

I'm trying to match whitespace characters (incliding tabs and, importantly, returns.

I'm using jedit and typing in the regular expressions in hte search box.

I'm trying to match the below code (and variations of it with maybe more spaces or more tabs where its alignment is different):

if (boolNeedsConnection){
                  boolSuccess=EComCon.commitOrRollback(con,boolSuccess);
            }

below is my best effort, but it does not match anyything

if \(boolNeedsConnection\){[[:space:][:blank:][:cntrl:]]boolSuccess=EComCon.commitOrRollback(con,boolSuccess);[[:space:][:blank:][:cntrl:]]}


can you help?
0
Comment
Question by:rosshind
  • 4
7 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 11853167
Try


if\s*\(boolNeedsConnection\)\s*{\s*boolSuccess=EComCon\.commitOrRollback\(con,boolSuccess\);\s*}
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 11882439
Certainly that re worked fine for me in JEdit
0
 
LVL 20

Expert Comment

by:Venabili
ID: 11882470
CEHJ,

I know. I am trying to wake up askers with these pings:) If I ask for experts recommendations, I post it in the text ;) Thanks anyway ;)

Venabili
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 86

Expert Comment

by:CEHJ
ID: 11883038
>>I am trying to wake up askers with these pings:)

I know too ;-)
0
 

Author Comment

by:rosshind
ID: 11901667
Thanks for your answer, it works a treat.

Sorry about the delay in responding
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 11901671
8-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now