P
Prabh
Hi,
I'm rather new to Java and more of a Perl guy.
Could anyone give some ideas how to accomplish the following, please?
I need to extract certain information from a text-file and generate a new file.
"From" file:
=============
It is a .properties file with a series of property settings.
Setting1 = "Foo"
Setting2 = "Bar"
Generated File:
==============
Generated file would contain info along the lines,
Setting1 obtained from "From" file = Foo
--------------------------------------------------------------
Basically, for each property I need to extract its value.
In Perl I'd do something like,
$valueFromSetting1 = (split(/=/,$line))[1] if ( $line =~ /Setting1/ ) ;
Could anyone point me to the right Java docs, manuals I should read.
Thanks,
Prabh
I'm rather new to Java and more of a Perl guy.
Could anyone give some ideas how to accomplish the following, please?
I need to extract certain information from a text-file and generate a new file.
"From" file:
=============
It is a .properties file with a series of property settings.
Setting1 = "Foo"
Setting2 = "Bar"
Generated File:
==============
Generated file would contain info along the lines,
Setting1 obtained from "From" file = Foo
--------------------------------------------------------------
Basically, for each property I need to extract its value.
In Perl I'd do something like,
$valueFromSetting1 = (split(/=/,$line))[1] if ( $line =~ /Setting1/ ) ;
Could anyone point me to the right Java docs, manuals I should read.
Thanks,
Prabh