n9mfk9 Posted January 12, 2008 Posted January 12, 2008 hi everyone Im try to look for .. or .... this is not working $test = StringRegExpReplace($line,('.{2,4}','//') what did i do wrong Thanks Beau
weaponx Posted January 12, 2008 Posted January 12, 2008 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.
n9mfk9 Posted January 12, 2008 Author Posted January 12, 2008 (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/lonhere what i went $sunrise = "%sunrise%"; //sun rise time (make sure you have the correct lat/lonthe number of dots change on each line that why i was trying to seat a rangethanks beau Edited January 12, 2008 by n9mfk9
Bowmore Posted January 12, 2008 Posted January 12, 2008 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 beauTry 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
n9mfk9 Posted January 13, 2008 Author Posted January 13, 2008 I got this errorC:\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
n9mfk9 Posted January 19, 2008 Author Posted January 19, 2008 Hi everyone i got it working with $output = StringRegExpReplace($line,"\.{2,9}","") thanks Beau
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now