Solved

regular expressions in jedit: matching whitespace and returns

Posted on 2004-08-20
7
405 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

743 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

9 Experts available now in Live!

Get 1:1 Help Now