Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unicode regexp example required

Status
Not open for further replies.

svar

Programmer
Aug 12, 2001
349
GR
I am reading data from an excel file in a local language.
What I need to do is say:
if ($field=~/local_string_that_I_copy_from_the_excel_cell_into_the_perl_script/){$field=...;}

any idea how to do it? It does not seem to work if I just copy the string in the regexp.
 
How are you reading the Excel file? Using a module? If so, which one? Under what operating system? If you just print all of the fields out instead of trying to use a regex, do they look how they did in Excel?

Annihilannic.
 
Spreadsheet::parseExcel0.32
OS=WinXp
Yes, I see them just like they look in Excel if I run with the ptkdb debugger
perl -d ptkdb myscript.pl
 
It's difficult to say without seeing some sample data. Do you have to use a regex? If you are matching the entire field, have you tried matching a string literal just using if ($field eq 'String from field') { ... }?

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top