Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Script to remove characters


  • Please log in to reply
4 replies to this topic

#1 Mucho

Mucho

    Seeker

  • Active Members
  • 42 posts

Posted 06 July 2007 - 06:26 AM

I need some expert help. I copied a chunk of text into a notepad like this:


John Doe Client Name 2:
CDP A/C Status: A CDP Last Updated: 19960604
GSA No.: A1681 - 0539 - 0731 NRIC/Passport No.: 0062073D
Nationality: 1 Birthday Date: 0
Marital Status: RSD Address 1: 999 CASHEN ROAD
RSD Address 2: #14-10 RSD Address 3:
PostCode: 112233


I need a script to automate removing the unnecessary data so that it becomes like this:


John Doe
999 CASHEN ROAD
Jamestown 112233


Can someone pls help?







#2 Jos

Jos

    Je maintiendrai

  • Developers
  • 23,499 posts

Posted 06 July 2007 - 06:57 AM

2 questions:

1- You want this written in AutoIt version 2 or did you pick the wrong Forum?
2- What have you attempted yourself and where did you get stuck ?

:whistle:

Edited by JdeB, 06 July 2007 - 06:57 AM.

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#3 Mucho

Mucho

    Seeker

  • Active Members
  • 42 posts

Posted 06 July 2007 - 08:11 AM

2 questions:

1- You want this written in AutoIt version 2 or did you pick the wrong Forum?
2- What have you attempted yourself and where did you get stuck ?

:whistle:



1) I would like it written in AutoIt v3. I am using the latest version.

2) My programming skill is not quite up to it and character handling, like searching for specific characters is my weak area but
I need to get this job done soon.

I hope you can help.

Edited by Mucho, 06 July 2007 - 08:14 AM.


#4 MisterBates

MisterBates

    Adventurer

  • Active Members
  • PipPip
  • 108 posts

Posted 06 July 2007 - 08:24 AM

1) I would like it written in AutoIt v3. I am using the latest version.

2) My programming skill is not quite up to it and character handling, like searching for specific characters is my weak area but
I need to get this job done soon.

I hope you can help.

Could be quite simple with RegExp functions *if* you had one label followed by a colon followed by the data for that label on a line, but most of the lines you show have two labels/fields per line. Can you get the data in a better format - is there any option to "export" to a CSV or tab-separated file for example?

#5 Jos

Jos

    Je maintiendrai

  • Developers
  • 23,499 posts

Posted 06 July 2007 - 08:34 AM

I have no issues helping but will not write it for you ...
Will move this thread to the V3 support forum soon..
:whistle:

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users