Jump to content

[SOLVED] stringregexp, how do I refer to the start and end of the string?


Recommended Posts

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 by Mingre
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

×
×
  • Create New...