• Post Reply 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Reading Reg exp from text file give error

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to All,

I am reading regx from a txt file in which data is written in XML format.
Now the problem is when is get the regx after reading and parsing the file .
The reg exp does not work fine. I mean matcher,matches() return false for any kind of input string.


Can anyone help in this??

Regards

Hira
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,Hira Iqbal

Can you give the code what you have done...

 
Hira Iqbal
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm what code ??

The code which read file?

the code which parse it?

or the whole code??

 
pradipta kumar rout
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to see the code ....

Its better to give the code which parse it?
 
Hira Iqbal
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok

folllowing is the codewhich read the file




and following is the code which do parsing .....

 
Hira Iqbal
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ooopsss sorry !!

following is the code which do the parsing



 
Hira Iqbal
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helloooooo!!!

anybody home???
 
Marshal
Posts: 64707
226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hira Iqbal wrote:Helloooooo!!!

anybody home???

Read this.

That sort of comment is an effective way of annoying everybody else and dissuading them from answering.
 
Hira Iqbal
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to All,

And sorry campBell I will be carefull next time.

However , My problem is solved looks like I was not passing the regx in a proper way.

I was writting as following \\d{1,3}

but i have to wirte it like \d{1,3}

Thanks to everyone for your responses.

Regards
Hira
 
Campbell Ritchie
Marshal
Posts: 64707
226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apologies accepted

So the error was in something you hadn't shown us before?
 
Hira Iqbal
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

No ! the error was in something I did not expected to have error.....

Regards
Hira Iqbal
 
Campbell Ritchie
Marshal
Posts: 64707
226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just shows you . . . these errors appear mysteriously when you least expect them and where you least expect them.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!