Jump to content

File Read, String, Find


Recommended Posts

I'm wondering if anyone could point me in the right direction. What im trying to do is pull the 11 char's after MAPNUMBER out of the line below. Also I havent looked into this but I I would also like to pull the date after MAPREVISED and convert it to number in this format "MM/DD/YYYY". I could probably find the second out after I figure out the first question.

ranceapplicationsforthesubjectMAPNUMBER05143C0035FMAPREVISEDMAY16,2008yManagementAgency

Thanks again for any help

Link to comment
Share on other sites

  • Moderators

I'm wondering if anyone could point me in the right direction. What im trying to do is pull the 11 char's after MAPNUMBER out of the line below. Also I havent looked into this but I I would also like to pull the date after MAPREVISED and convert it to number in this format "MM/DD/YYYY". I could probably find the second out after I figure out the first question.

ranceapplicationsforthesubjectMAPNUMBER05143C0035FMAPREVISEDMAY16,2008yManagementAgency

Thanks again for any help

You'll have to create your own String Month to Integer Month conversion:
#include <array.au3>
Local $sString = "ranceapplicationsforthesubjectMAPNUMBER05143C0035FMAPREVISEDMAY16,2008yManagementAgency"
Local $aSRE = StringRegExp($sString, "MAPNUMBER(.{11}).*?MAPREVISED(\w+\d{2},\d{4})", 3)
_ArrayDisplay($aSRE)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

You'll have to create your own String Month to Integer Month conversion:

#include <array.au3>
Local $sString = "ranceapplicationsforthesubjectMAPNUMBER05143C0035FMAPREVISEDMAY16,2008yManagementAgency"
Local $aSRE = StringRegExp($sString, "MAPNUMBER(.{11}).*?MAPREVISED(\w+\d{2},\d{4})", 3)
_ArrayDisplay($aSRE)

Thanks I knew it was one of these just didnt know how to get it to work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...