RE: Re: drop down box or something like it.
"Hale, Paul" <Paul.Hale-uv/[email protected]>
| Newsgroups | gmane.comp.windows.shells.litestep |
|---|---|
| Message-ID | <23DBD872E5D0B44E8296E93447E0F607050489CA@01ohday01n00005.ad.bls.com> |
> This is where you have to read the xtextedit docs, so as to
> know the escape codes specific to this module:
I swear to god, I have been reading the Docs, I got the regular
expressions confused with Escape codes.
>
> ------------
> Escape Codes
>
> The backslash (\) character is used to mark an escape code.
> The following are valid escape sequences:
>
> \= Double quote (")
> \^ Replaces with a bang (!)
> \# Replaces with a dollar sign ($) (Useful for evars, for
> example \#litestepdir\# will become $litestepdir$) \~ Semicolon (;)
>
> \1 Ignored and used in !xTextReplace(All) for () matches
> (explained below also with \2, \3 ,...)
>
> Any other use of backslash will be ignored unless it is used
> for a character used in regexps, such as * or \.
> ------------
>
> So @(^%1 \=)(.*\\)(.*\..*\=)_@ breaks down to (using [] for delimiters
> here):
>
> 1) Everything from start of line to first occurrence of [
> "] is assigned to the first pattern; this is the evar name
> plus the space that separates it from the evar value. My evar
> values are *always* quoted - that's how xtextedit saves
> things, and any scripts I write maintain that convention.
>
> 2) The second pattern captures any sequence of characters
> [.*] ending with a backslash [\]; this will be the "path".
>
> 3) The third sequence captures a series of characters (the
> file name) [.*] followed by a dot [\.] followed by another
> series of characters (the extension) [.*] that ends with a
> quote [\=] and is then followed by the end of the line [_].
>
> We write out the first and third patterns, tossing the second
> [@\1\3@], so that
>
> name "c:\path\more_path\filename.extension"
>
> becomes
>
> name "filename.extension"
>
> !stripextension does the same thing, only now we've assigned
> the filename to the first sequence we match (^%1 \=.*), %1
> being the evar name we're modifying, and the extension to the
> second sequence, which is then discarded. We write out only
> the first pattern, then add a quote, as we lumped (and
> discarded) that with the extension [@\1\=@].
>
> QED =)
Now I know I am doing this correctly, I have it perfect. I had an extra
( that was throwing it off. I don't know how it got in there, I was
copying and pasting your work before.
I really appreciate the work you put into helping me out Brian.
Honestly, we should have a MVP award given to you. For years I have been
getting help from you, and you still seem to have patience.
I better stop here, I feel an Air Supply song getting ready to break
out...
>
> ---------------------------------------------------------------------
> Can't Unsubscribe? Check http://desktopian.org/listunsub.html
> LS List Homepage: http://wuzzle.org/list/litestep.php
> Get the LS FAQ: http://lsfaq.shellfront.org
>
>
>
------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may
contain confidential, proprietary and or privileged material. Any review, retransmission, dissemination
or other use of, or taking of any action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. If you received this email in error, please contact the sender
and delete the material from all computers.
This electronic mail message was sent from L. M. Berry & Company or Berry Network, Inc. Our primary business
address is 3170 Kettering Blvd., Dayton, OH 45439. This message may constitute a commercial solicitation or
advertisement as defined by the CAN-SPAM act of 2003. If you do not wish to receive future commercial
electronic mail solicitations or advertisements from L. M. Berry & Company or Berry Network, Inc.,
please send a request to [email protected]
==============================================================================
---------------------------------------------------------------------
Can't Unsubscribe? Check http://desktopian.org/listunsub.html
LS List Homepage: http://wuzzle.org/list/litestep.php
Get the LS FAQ: http://lsfaq.shellfront.org