Jump to content

StringRegExp question


Recommended Posts

Hi, there is a way to escape a backlash contained in a variable?

$sPattern = 'Whatto\Find'

$aArray = StringRegExp($sString, '(?s)(?i)' & $sPattern & $vDelimit & '(' & $sStart & '.*?' & $sEnd & ')', 3)

ciao

Link to comment
Share on other sites

  • Moderators

Hi, there is a way to escape a backlash contained in a variable?

$sPattern = 'Whatto\Find'

$aArray = StringRegExp($sString, '(?s)(?i)' & $sPattern & $vDelimit & '(' & $sStart & '.*?' & $sEnd & ')', 3)

ciao

That looks like some of my RegExp() code.

\\

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

That looks like some of my RegExp() code.

\\

Hi, SmOke_N and thanks for Reply.

I have a Loop like this

_FileReadToArray($mytext, $aNewArr)

For $n = 1 to UBound($aNewArr) - 1
$aArray = StringRegExp($sString, '(?s)(?i)' & $sPattern & $vDelimit & '(' & $sStart & '.*?' & $sEnd & ')', 3)
Next
......
oÝ÷ Ø(®F«¢éݬy«­¢+Ø(ÀÌØíÍAÑÑɸôMÑÉ¥¹IÁ± ÀÌØíÍAÑÑɸ°ÅÕ½ÐìÀäÈìÅÕ½Ðì°ÅÕ½ÐìÀäÈìÀäÈìÅÕ½Ðì¤(oÝ÷ Ù»­#¬¶¼§Ê&zØb bëaÆ®¶­s`¢b33c¶'&Ò7G&æu&VtWb33c·57G&ærÂb33²÷2öb3#²b3#²b33²fײb33c·5GFW&âfײb33c·dFVÆÖBfײb33²b33²fײb33c·57F'Bfײb33²â£òb33²fײb33c·4VæBfײb33²b33²Â2

obviously not work

Ciao

Link to comment
Share on other sites

  • Moderators

Don't really know what you want, or what you thought putting \\ at the front of the search was going to do.... string replace is your safest bet as it seems you don't know much about regexp.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...