Jump to content

StringRegExpReplace(


n9mfk9
 Share

Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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