Jump to content

Teslafreak

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by Teslafreak

  1. Nope, I meant to show that it was indeed matching against itself, which is part of what was confusing me, since it wouldn't have been properly escaped there. I am guessing it matched anyway because in that instance it didn't have start and end anchors, so it just matched the middle. Again, I get it, and again, it was a crappy example on my behalf. I will need to do some more tricky stuff later between the variable and the end anchor, so I did need to know what I was missing. I'm happy that someone knew what I meant, but I would agree with you given the information. It would not only be easier to use ==, it would also likely be more efficient from a processing perspective. It just wouldn't apply later on. Thanks again, everyone that replied.
  2. This was a simplistic example (and perhaps not the best one), I get what you mean though. I will need a regex option later though. That did it, I don't know why it hadn't thought to escape those, but thanks!
  3. I am trying to use StringRegExp to match a UNC path, and just can't get it to work. If I try $testserv = "\\server" If StringRegExp($testserv,$testserv) Then <some code> EndIf That works, as does $testserv = "^\\server$" If StringRegExp($testserv,$testserv) Then <some code> EndIf I am really trying to anchor the start and end. I cannot get it to work as such though $testserv = "\\server" If StringRegExp($testserv,'^'&$testserv&'$') Then <some code> EndIf Or as the more likely (to me anyway) $testserv = "\\server" $teststr = "*" & $testserv & "$" If StringRegExp($testserv, $teststr) Then <some code> EndIf I just can't seem to figure out how to concatenate the start and end anchors into a string for testing, or concatenate the whole thing in the actual function for testing. Any ideas? Thanks in advance to everyone.
  4. This is a tremendous help for me. 5 stars, thanks so much!
  5. Awesome, i'll have a look. Thanks!
  6. Is there a way to handle signals? For example, I am writing a console app, and I need it to run a function before closing if someone issues it Ctrl+C. I believe this is SIGINT, and I found some references to sending it to processes, but can't find anything about handling it. Any ideas?
  7. Just stopping by to say THANK YOU! I have been working on some console tools in autoit, and it drives me nuts that there is really no console working facilities to speak of. I mean, it would take about 20 characters to get a line of input in Perl, and the only solution I have seen (besides your excellent one) is several lines long. Again, THANKS!
×
×
  • Create New...