Jump to content

Recommended Posts

Posted

hi everyone

Im try to look for .. or ....

this is not working

$test = StringRegExpReplace($line,('.{2,4}','//')

what did i do wrong Thanks Beau

Posted

You need to post an example string that you are trying the replace on. You should also tell us what you expect the output to look like.

Posted (edited)

You need to post an example string that you are trying the replace on. You should also tell us what you expect the output to look like.

here the input

$sunrise = "%sunrise%"; ..................sun rise time (make sure you have the correct lat/lon

here what i went $sunrise = "%sunrise%"; //sun rise time (make sure you have the correct lat/lon

the number of dots change on each line that why i was trying to seat a range

thanks beau

Edited by n9mfk9
Posted

here the input

$sunrise = "%sunrise%"; ..................sun rise time (make sure you have the correct lat/lon

here what i went $sunrise = "%sunrise%"; //sun rise time (make sure you have the correct lat/lon

the number of dots change on each line that why i was trying to seat a range

thanks beau

Try this

$test = StringRegExpReplace($line,('\.{2,4}','//')

In regular expressions the dot character '.' actually means any character if you want to find actual dots you need to escape it by placing a backslash before it e.g. '\.'

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Posted

I got this error

C:\Documents and Settings\beau thompson\My Documents\au3\test\weatherpage\mytagmaker.au3(35,48) : ERROR: unbalanced paranthesis expression.

$test = StringRegExpReplace($line,('\.{2,4}',

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\beau thompson\My Documents\au3\test\weatherpage\mytagmaker.au3 - 1 error(s), 0 warning(s)

thanks Beau

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...