comp.lang.java.help
  Home FAQ Contact Sign in
comp.lang.java.help only
 
Advanced search
July 2008
motuwethfrsasuw
 123456 27
78910111213 28
14151617181920 29
21222324252627 30
28293031    31
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.java.help Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Another regex question         


Author: Knute Johnson
Date: Jul 14, 2008 23:04

Is there a way to get multiple capturing groups without having multiple
sets of parenthesis?

"ABCDEFGHIJKL"

Regex "(\\w{3})" will match 3 letters

"(\\w{3}){4}" will match all four sets of three letters but there will
be only one capturing group.

Is there a way to get multiple capturing groups without doing
"(\\w{3})(\\w{3})(\\w{3})(\\w{3})"?

Thanks,

--

Knute Johnson
email s/nospam/knute2008/

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
4 Comments
  Regex?         


Author: Knute Johnson
Date: Jul 14, 2008 12:00

I've got a complicated pattern that I have to parse and was trying to
figure out if I could do it with a regex. I'm hoping some of the regex
experts here can help.

| | | | | | | | | | | |
RFO012010302ABCDEF01ghi02stuvwx

Fields that I need to match;

RFO - text field
012 - text field
01 - text field
03 - count of fields to follow
02 - number of subfields
ABC - first subfield
DEF - second subfield
01 - number of subfields
ghi - subfield
02 - number of subfields
stu - first subfield
vwx - second subfield

The field count can vary as well as the subfield counts.
Show full article (1.19Kb)
5 Comments
  stop and resume the execution of code         


Author: xareon
Date: Jul 14, 2008 09:55

hi all, i got this slight problem. i have some instances of objects
from two classes, say Obj1 and Obj2 with their methods method1() and
method2(). let's say i have different instancs of Obj1 and only one of
Obj2: i have to implement a behaivour like this:

public void method1() // of the class Obj1
{
//do something

// stop the execution of the code of this method of the Obj1 and save
its state (it would be, the "line" of code till i have executed the
code) in a static common list

// do something else

//resume the execution of a stopped method2() of an Obj2 that's surely
in the list after having resumed this method

// re-execute method1() after a certain (variable) amount of time
}

public void method2() // of the class Obj2
{
//do something else
Show full article (2.03Kb)
no comments
  Re: Please don't laugh. Java question...........         


Author: Lew
Date: Jul 14, 2008 05:47

FACE wrote:
> In Control Panel, Add/Remove programs shows:
> Java (TM) 6 Update 2
> Java (TM) 6 Update 3
> Java (TM) 6 Update 5
> Java (TM) 6 Update 7,
>
> Which, if any, can be deleted?
...
> Thank you, Lew, I definitely want to keep the most current.

I'm so upset that I answered your question before I realized that you had
multi-posted it. I would not have, if I had realized that.

Do not multi-post.

--
Lew
1 Comment
  Please don't laugh. Java question...........         


Author: FACE
Date: Jul 14, 2008 05:14

If not this group, which group is for general Java questions from users?

I am Running

Win XP Pro

Browsers:
Netscape 7.1
Firefox 2.0.0.15
Safari 3.0.4
IE 7

Under program files, the tree looks like this:

¦ +--Java
+¦ ¦ +--j2re1.4.1_02
+¦ ¦ +--jre1.6.0_02
+¦ ¦ +--jre1.6.0_03
+¦ ¦ +--jre1.6.0_05
+¦ ¦ +--jre1.6.0_07
Show full article (0.54Kb)
4 Comments
  Creating scheduled tasks         


Author: CBO
Date: Jul 14, 2008 02:38

Hi all,

I am currently developing a java application that is capable of
shutting down computers on a network. I would like the user to be able
to set some options with the program i.e. what rooms and what
computers etc and set the time and date for this shutdown to be
performed. I want the user to be able to select daily, weekly monthly,
the days that they can do i.e. monday, tuesday, etc and the hours and
minutes, day, month and year etc. Once this is done ideally without
the program needing to be running in background the sheduled task runs
and the program shuts the computers down.

I have no idea how I would go about doing this,

Any help in this matter would be highly appreciated.

Thank you
1 Comment
  CAR CHEAP INSURANCE         


Author: nancygroup2
Date: Jul 14, 2008 02:28

no comments
  Remove last item from JList         


Author: CBO
Date: Jul 14, 2008 02:11

Hi all,

I am currently developing a java application that reads in a file and
populates the information inside the data file into a JList. I want
the user to be able to select an item from the JList and then they are
able to delete the item which rewrites the new data to the the file
and repopulates the JList.

This method works fine until there is only one item remaining inside
the JList. The problem is when the user presses delete the item is
removed from JList but an error is produced and the new data is not
written to the file i.e. to make it empty.

Below is the error message that is displayed:

Exception occurred during event dispatching:
java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(Unknown Source)
at
remoteshutdown.ExceptionsList.btnDelete_actionPerformed(ExceptionsList...
Show full article (6.02Kb)
2 Comments