Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

regular expression for new line not in double quotes

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
this is line one:
kalyan Kumar1,kalyan1@yahoo.com,"this
is
test
message1"\r

this is line two:

kalyan kumar2,kalyan2@yahoo.com,this is test message2 \r

In java how to write a single regex that recognizes end of line for the above 2 lines.

Please note that
"this
is
test
message1"
is single field.


A simple \r will make the line1 as 4 lines
and line2 as single line

Thanks in advance.
 
Marshal
Posts: 79475
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
To the Java Tutorials! Look especially at the sections about character classes and predefined character classes.
 
Campbell Ritchie
Marshal
Posts: 79475
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
If my previous link doesn't help, try Pattern in the API.
 
kkalyan kkumar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Thanks for the help, I am trying with that....

But can anyone give me some more help please.

Thanks in advance.
 
Sheriff
Posts: 67749
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
"kkalyan kkumar", having ignored three warnings to adjust your display name to adhere to JavaRanch requirements, your account has been closed. Should you wish to have your account re-instated you must contact me by email.

bear
JavaRanch Sheriff
[ September 16, 2008: Message edited by: Bear Bibeault ]
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic