Welcome, Guest. Please Login or Register.
May 04, 2025, 10:34:21 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Does <search> <replace> iterate? « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Does <search> <replace> iterate?  (Read 309 times)
AnalogDuck
Jr. Member
**
Posts: 54


I'm a Ducky! Quack quack...

ICQ - 131723443analogduck@hotmail.com WWW
Does <search> <replace> iterate?
« on: July 25, 2002, 04:45:00 AM »
Reply with quote

So will <search> and <replace> iterate throughout a <file>?  By this I mean, if I

<file>
file.php
</file>

<search>
foo
</search>

<replace>
bar
</replace>

And my file.php has many instances of 'foo', will they all become 'bars'?  Or just the first one?

Oh heck, that example was simple enough I think I'll go create it now and run thru it.
Logged

-- What does an "analog duck" sound like anyway?  That's the kind of noises I want to make... ;)
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:Does <search> <replace> iterate?
« Reply #1 on: July 25, 2002, 04:48:02 AM »
Reply with quote

Only the first one.  This would be something cool to see in Boardmod though.  Like the option to add "all" to a tag and then it does every occurence.
Logged

groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:Does <search> <replace> iterate?
« Reply #2 on: July 25, 2002, 06:32:12 AM »
Reply with quote

God, that would make my life 10000x easier.  I am learning Regex for 1 script which is taking me weeks!
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Does <search> <replace> iterate? « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.058 seconds with 20 queries.