Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Text validation problem

by lily123 (Novice)
on Sep 02, 2004 at 12:10 UTC ( [id://387878]=perlquestion: print w/replies, xml ) Need Help??

lily123 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Guys

I have the below doubts. Im working on text validation (reporting errors with a word file). Im using Win32::Ole to interact with word.
1) how to identify if a word is surrounded by parentheses or not? any modules available thro' which i can check whether any junk of text is enclosed in parenthes?

Modules containing all units(in abbr. and expaned form)

Module containing Us and its Uk version of english words.?

Have anyone done validatoin of word file differently or is it possible to do it effectively thro' perl?
Any suggestion regd. the above is most welcome
Thanx

Replies are listed 'Best First'.
Re: Text validation problem
by Crian (Curate) on Sep 02, 2004 at 12:16 UTC

    > Have anyone done validatoin of word file differently or is it possible to do it effectively thro' perl?

    I validate text files (no word files, just plain ascii) with Perl. Perl is very good at this. For catching parenthesis I wrote my own function, I do not know of any module that does this. You have to work around a few problems like not closed open parenthesis or else like this, but in general you can relative easily catch the parenthesis with regular expressions.

Re: Text validation problem
by Anonymous Monk on Sep 02, 2004 at 13:32 UTC

      I think my post above has been downvoted because I use my own function and not the module mentioned above. As far as I know can it only say, if the string is in parenthesis or not, but it can not handle strings with parts in parenthesis. My function insertes XML-Tags that show matching or not matching parenthesis and much more, thats why I have to do it my own way. I just wanted to show, that Perl is very good in string handling and tasks like the one of the original poster can be done with Perl very well. I think there is no reason for downvoting. If you have a problem with that tell me, but don't downvote.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://387878]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-16 04:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found