LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-28-2005, 07:24 AM   #1
zymos
Member
 
Registered: Mar 2005
Posts: 38

Rep: Reputation: 15
regular expresions: java: matching lines with out string


I am interfacing with a java program and i am having trouble figuring out howto match all lines that do not contain "string"

(.*string.*)
will match all lines with "string" but i need to opposite.

also i need lines that do not contain "?"
i assume its just "/?" for the string but im not sure

thanks
jeff


http://dir.happytrees.org
 
Old 05-28-2005, 09:17 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
I think you'll find your answers there:
http://www.oreilly.com/catalog/regex2/chapter/ch08.pdf
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Divide up lines with string delimiter elmu Programming 3 10-07-2005 08:48 AM
Regular expression to match a valid URL string vharishankar Programming 13 07-21-2005 09:17 PM
Regular Expresions on C++ poeta_boy Programming 7 06-18-2004 12:00 AM
java test if string in string array is null. exodist Programming 3 02-21-2004 01:39 PM
java + string tokenizer dave bean Programming 2 12-10-2003 03:22 PM


All times are GMT -5. The time now is 03:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration