Jump to content

Search the Community

Showing results for tags 'non-capturing'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. For my application, I have one string that may contain as item pointers a "space + single character/number + )" For example: Some text. 1) blah 2) blah a) yes b) no. I'd like this to become: Some text. (1) blah (2) blah (a) yes (b) no. It seems I understand the use of the back reference $1, but I may not be grasping the functionality of non-capturing groups... I hoped I could use the latter functionality so in the MAIN CODE I would not get the space between '(' and $1 The first code line below now giving me: Some text. ( 1) blah ( 2) blah ( a) yes ( b) no. Local $sOutput = StringRegExpReplace($sInput, '((?:\s).\))', ' ($1' ) As another trial, this doesn't seem to work either: Local $sOutput = StringRegExpReplace($sInput, '(\s.\))', ' (' & StringRight('$1', 2) ) MAIN CODE: Test() Func Test() Local $sInput = 'Some text. 1) blah 2) blah a) yes b) no.' ; look for 'space + any char + )' and put '(' in front Local $sOutput = StringRegExpReplace($sInput, '( (?:\s).\) )' , ' ($1' ) Display($sInput, $sOutput) EndFunc ;==>Test Func Display($sInput, $sOutput) ; Format the output. Local $sMsg = StringFormat("Input:\t%s\n\nOutput:\t%s", $sInput, $sOutput) MsgBox(0, "Results", $sMsg) EndFunc ;==>Display Thank you for any pointers
×
×
  • Create New...