Jump to content

# Search the Community

Showing results for tags 'regex'.

• ### Search By Tags

Type tags separated by commas.

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

• Forum
• AutoIt

### Calendars

• Community Calendar

• 0 Comments

• 0 Replies

• 0 Reviews

• 0 Views

Found 43 results

1. ## Regex... Repeating Block of Regex

I have an XML file and every time there are three lines in a row with only <null/> in them, i want to insert a fourth line with <null/>. Each line starts with 3 white spaces, followed by <null/> and ends with a white space followed by CR LF. The presence of the three lines as described is unique to the points where I want to insert a line in this document. I'm trying to figure out how to apply the repeating part of a regex {1,4} but apply it to this whole segment. So far I have the below which picks up an individual line ok: ^\s{3}<null/>\s\r\n I tried wrapping it all in braces () then adding {3} but I'm obviously getting something wrong. Attached is a section from the xml file with a block of nulls that should be matched if anyone would like to have a look. Help_From_Forum.xml
2. ## Searching Regex and define an array

I am trying to search in a web browser dates XX/XX/XXXX that are also links. I want to click them after and remove them from the array. This is all I have so far. Nothing shows up. What am I doing wrong? ControlFocus ("Customer Center", "", "") Local $aArray = StringRegExp('(..)/(..)/(....)', '(..)/(..)/(....)',$STR_REGEXPARRAYFULLMATCH) For $i = 0 To UBound($aArray) - 1 MsgBox($MB_SYSTEMMODAL, "RegExp Test with Option 2 - " &$i, $aArray[$i]) Next
3. ## StringRegExpReplace - replace 'COMMA' with ','

Hi All, I'd like to replace 'COMMA' with ',' for example: $myString = "COMMA" StringRegExpReplace($myString, 'COMMA', ',') Now I've tried escaping the ',' in various ways unsuccessfully, such as: '[,]' "[,]" '\,' [,] seems to work in the pattern, I just can't figure out how to use it in the replace, and it seems everyone online is only interested in removing/replacing commas lol. I also tried creating and using a variable as the replacement but also didn't work: $myComma = ","$myString = "COMMA" StringRegExpReplace($myString, 'COMMA',$myComma) I'm sure it's super simple if someone could point me in the right direction - thanks.

×

• Wiki

• Back

• Git