View Single Post
  #2 (permalink)  
Old 08-09-2006, 11:29 PM
brackett brackett is offline
Programmer
 
Join Date: May 2006
Posts: 193
Credits: 0
Rep Power: 11
brackett is on a distinguished road
Default

Quote:
Originally Posted by Frantic
If I have a file like this:

I have a file that has space

How can I do a replace of any amount of space (1 to 20)? I'd like to take that line and replace it with something like : so I can then split into an array.
You'll want to do a RegEx lreplace. The pattern would be " +" (1 or more space) and you'd replace with the single character you want (either a single space or colon - whatever you prefer).
Reply With Quote