Mingre Posted March 28, 2015 Posted March 28, 2015 (edited) Hello, Not sure if I asked the right question but how do I modify the pattern so that it only matches the second test string? $sTest1 = 'bErtrTRtrtXa' $sTest2 = 'ErtrTRtrtX' $sPattern = 'E[A-Za-z]{0,}X' Local $iResult1 = StringRegExp($sTest1, $sPattern) Local $iResult2 = StringRegExp($sTest2, $sPattern) ConsoleWrite('Test 1: ' & $iResult1 & @CRLF & 'Test 2: ' & $iResult2) Thanks! Edited March 28, 2015 by Mingre
Mingre Posted March 28, 2015 Author Posted March 28, 2015 Hello, just saw the section about anchors A and Z. Problem solved. Thank you!
jguinch Posted March 28, 2015 Posted March 28, 2015 Also, {0,} is the same thing than using a wildcard : ^E[A-Za-z]*X$ Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now