• 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 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

regExp pattern/matcher problem

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,


I am using postgres 7.4.6 and java 1.4.

I have created a table, like
create table usr (usr_id varchar(15), usr_filename_pattern varchar(1024));

insert into usr values ('A', '(d*-d*-d)');
insert into usr values ('B', '(dd-dd-dd)');
insert into usr values ('C', '(d*-d*-d)|(dd-dd-dd)');

i.e. value of usr_id = 'A' and usr_filename_pattern = '(d*-d*-d)'

i want to replace '(d*-d*-d)' with '(\\d*-\\d*-\\d)' using pattern and matcher method of java.

what is the value of regExp for matching
String fileNamePattern = '(d*-d*-d)|(dd-dd-dd)';

pl. help me out...

Thanks in advanced..

ketan
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic