Jump to content

StringRegExp result not making any sense


Recommended Posts

Okay, I've been banging my head against this for at least an hour now.

I'm sure it's something simple, but I can't for the life of me figure it out. I wanted to check here before I submit it as a bug.

$data = "|pbupload:test|anothervar:test2|"
$regex = StringRegExp($data, "|error:([^|:]+)|", 1)
ConsoleWrite(@error&@CRLF&@extended&@CRLF)

That outputs:

0
1

WHY? The pattern should mean:

Literal string "|error:" followed by 1 or more characters that are not "|" or ":" (and capture it as a group) and then the literal string "|"

That pattern should NOT match the test string because "error:" is not in it!

Please tell me I'm going crazy and missing something simple...

Edited by OverloadUT
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...