AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

java regexp help

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
mike
Guest





PostPosted: Tue May 15, 2007 4:03 pm    Post subject: java regexp help Reply with quote



Hi,

I am using java 1.4.

I have lines that looks like the following:

#include "nc_ncmi_nbap_handler.sig"

How can I match lines like this?

This part it not different on each line:

nc_ncmi_nbap_handler

All hints appreciated!

cheers,


//mikael
Back to top
hiwa
Guest





PostPosted: Thu May 17, 2007 4:05 am    Post subject: Re: java regexp help Reply with quote



On May 15, 8:03 pm, mike <mikaelpetter...@hotmail.com> wrote:
Quote:
Hi,

I am using java 1.4.

I have lines that looks like the following:

#include "nc_ncmi_nbap_handler.sig"

How can I match lines like this?

This part it not different on each line:

nc_ncmi_nbap_handler

All hints appreciated!

cheers,

//mikael

I don't think you need regex.
Just do
if (line.equals("#include \"nc_ncmi_nbap_handler.sig\"")){
...
}
Back to top
hiwa
Guest





PostPosted: Thu May 17, 2007 7:11 am    Post subject: Re: java regexp help Reply with quote



On May 15, 8:03 pm, mike <mikaelpetter...@hotmail.com> wrote:
Quote:
Hi,

I am using java 1.4.

I have lines that looks like the following:

#include "nc_ncmi_nbap_handler.sig"

How can I match lines like this?

This part it not different on each line:

nc_ncmi_nbap_handler

All hints appreciated!

cheers,

//mikael

I think you don't need to use regex.
if (line.equals("#include \"nc_ncmi_nbap_handler.sig\"")){
...
}
Back to top
Roedy Green
Guest





PostPosted: Thu May 17, 2007 7:11 am    Post subject: Re: java regexp help Reply with quote

On 15 May 2007 04:03:59 -0700, mike <mikaelpetterson (AT) hotmail (DOT) com>
wrote, quoted or indirectly quoted someone who said :

Quote:
I have lines that looks like the following:

#include "nc_ncmi_nbap_handler.sig"

How can I match lines like this?

This part it not different on each line:


see http://mindprod.com/jgloss/regex.html

Also see http://mindprod.com/applets/quoter.html

to get the search regex string.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.