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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by scareyman

  1. scareyman

    Parsing a string using regex

    Hi thanks for the replies. Now solved as follows: s/^\d\d\d://g; # remove 1st 'length' field s/(,\d\d\d:)|(\d\d\d:)/:/g; # remove middle 'length' fields s/:$//g; # remove last 'length' field And the field xx,xx was xxxx (and therefore 4 in length) but I added a...
  2. scareyman

    Parsing a string using regex

    However, I think I can do it as follows, absed on your example: s/^\d\d\d://g; s/(,\d\d\d:)|(\d\d\d:)/:/g; This will give me 000000000000100778:abcdefghij:xx,xx:bbb:abcdefghijklmnopq:x Thanks for your help.
  3. scareyman

    Parsing a string using regex

    Hi thanks for replying. No Typo I'm afraid. If there were no commas, then I'd be able to use it as some sort of delimeter. However, the field with xx,xx is one field i.e. the value is "xx,xx".
  4. scareyman

    Parsing a string using regex

    I have a string that I want to extract fields from. The string is awkward (to me anyway). It is as follows: 018:000000000000100778,010:abcdefghij,004:xx,xx,003:bbb,017:abcdefghijklmnopq,001:x Each 3 digit number before the : is the size of the proceeding field i.e. 018:000000000000100778 means...
  5. scareyman

    Trapping CROAK and other errors

    Kinda fixed...performing a port scan before attempting RFC connect which I can trap by supplying an appropriate timeout.
  6. scareyman

    Trapping CROAK and other errors

    Paul the very first thing that happens is a connection is initiated as follows: $rfc = new SAP::Rfc( ASHOST => $server, USER => $user, PASSWD => $pwd, LANG => 'EN', CLIENT => $client, SYSNR => $sysnr, TRACE => $trace ); If this...
  7. scareyman

    Trapping CROAK and other errors

    I am running a Perl script that calls SAP RFC to communicate with an SAP system. If the system doesn't exist then my program dies with an RFC Timeout. In the C modules that were used, there is a CROAK routine which I think is where it issues the error. How can I prevent my Perl script from just...

Part and Inventory Search

Back
Top