Jump to content

String Parsing


modernes
 Share

Recommended Posts

What would be a good way to use to extract the name from the string?

StringSplit().

EDIT: Oh, wait. all the lines are ONE string?

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

If you know how much of the random data there is on either side of the important stuff

Look at the "StringTrim*"Functions

If you don't know this Look at "StringRegExp"

Edited by Paulie
Link to comment
Share on other sites

  • Moderators

Yes, the whole thing is ONE string - would there be a way to read starting from "Name:" all the way to carriage return?

Beta 3.2.1.12 ... Look at _StringBetween() and the StringRegExp option.

_StringBetween($sString, 'Name\:', '\r\n', -1, 1)oÝ÷ Ù8Z¶h Ü(®AÓ©¦ÈZvØ^  Åm§$ÁªÝ°Gb·b¶nÞv¬mÂäÊj{kÊØ^±ç(¸§jبËh±ç¢~Ø^ÉÚºÚ"µÍÔÝ[Ð]ÙY[  ÌÍÜÔÝ[Ë   ÌÎNÓ[YIÌLÎÌÎNË  ÌÎNÉÌLÜÌÎNËLKJoÝ÷ Ù«­¢+Ù}MÑÉ¥¹   Ñݸ ÀÌØíÍMÑÉ¥¹°Ìäí9µÀäÈìèÌäì°ÌäìÀäÈí¸Ìäì°´Ä°ÄoÝ÷ Ù«­¢+Ù}MÑÉ¥¹  Ñݸ ÀÌØíÍMÑÉ¥¹°Ìäí9µèÌäì°
I1¤oÝ÷ Ù«­¢+Ù}MÑÉ¥¹ Ñݸ ÀÌØíÍMÑÉ¥¹°Ìäí9µÀäÈìèÌäì°
HoÝ÷ Ù«­¢+Ù}MÑÉ¥¹    Ñݸ ÀÌØíÍMÑÉ¥¹°Ìäí9µÀäÈìèÌäì°1
Edited by SmOke_N

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

This should return "Name: Joe Blow", and everything after it into $temp, if that helps.

$string = clipget()
$temp = StringInStr($string, "Name: Joe Blow")
$temp = StringMid($string, $temp)
IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
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...