#1 2009-08-31 02:55

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

How to replace a "|"

I need to replace that bar but looks that now are the type of separator, so it doesn't work...  sad  sad  sad  sad


Edit: I will do it with RegEx hmm  roll

Last edited by SafetyCar (2009-08-31 03:05)


If this software has helped you, consider getting your pro version. :)

Offline

#2 2009-08-31 08:49

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: How to replace a "|"

SafetyCar wrote:

I need to replace that bar [...]
I will do it with RegEx hmm  roll

I don't know where you want to replace this  roll  .... but

if you want to match an pipe symbol | literally in an haystack,
you have to escape it with an backslash  \|  in the search pattern.

Haystack:      one|two
Find needle: one\|two



http://www.den4b.com/wiki/ReNamer:Regular_Expressions


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#3 2009-08-31 15:30

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: How to replace a "|"

No, I was talking about the replace rule, but I wasn't able to do it, I did it with the RegEx


If this software has helped you, consider getting your pro version. :)

Offline

#4 2009-09-06 21:30

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,376

Re: How to replace a "|"

Someone has recently proposed to change *|* delimiter in Replace and Remove rules to |, as in Rearrange rule. Well, I did that, and this topic is the answer to question whether it was a good idea or not... wink

I have reverted back to *|* delimiter in Replace and Remove rules. Latest beta version.

Offline

#5 2009-09-07 02:05

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: How to replace a "|"

Someone has recently proposed to change *|* delimiter in Replace and Remove rules to |, as in Rearrange rule.

That was me roll Just wanted to be unique, but didn't expect this example which is really rare wink


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#6 2009-09-07 10:41

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: How to replace a "|"

eR@SeR wrote:

but didn't expect this example which is really rare wink

In this case I just wanted to replace with a "/" after using detect extension (and I think that was also extracted from another idea that you had  tongue). The problem was that I have a preset prepared to do it, and this change gave me some problems.

But, well, I'm not against this change, but shouldn't it have a escape like in RegEx?

If I would like to do this, when reading the preset I would do it in this way (assuming the escape):
- If there is a | in use but it's not used like this: *|*, replace with \|
- Replace *|* with |

As I where writing I came across with a possible problem hmm
what about, if someone, after the update starts using * for other special purposes? like
*some_kind_of_tag* and wants to replace 2 results at a time? (OK, this is a little crazy but who knows)


Mmmm... one idea... What about something like a "compatibility signature" (I don't know how to call it) on the presets to know in which version of ReNamer was written.

And this could be combined, my first idea...


BUT
Even if you are not going to add the escape possibility, I think that the version of the program inside the preset file it's no so bad idea (for example: What now I'm thinking it's that it could be helpful, if you would like to update some pascal functions [ In this case the *.pas, would also need that "signature" {damn, an what would happen when importing the pascal to renamer?  sad }])


----------

I think I have a problem,
I think I think too much.

lol lol lol lol lol

I'm sorry, but there I leave my ideas, maybe someone can adapt and make them usable roll wink


Whow, wait... to finish one quote I heard a few days ago:
"The reason that God was able to create the world in seven days is that he didn't have to worry about the installed base." -- Enzo Torresi
lol

Last edited by SafetyCar (2009-09-07 10:55)


If this software has helped you, consider getting your pro version. :)

Offline

Board footer

Powered by FluxBB