How do I replace any number of character occurences with one occurrence?


Posted on 16th Feb 2014 07:03 pm by admin

How do I replace any number of character occurences with one occurrence?

Let's say I have:

aaa
aaaaaa
aaaaa
aaaaaaaa

All of the above should be replaces with a single 'z' character say for example

I can do exact matches, say for 'aaaaaa' - but am unsure how I can do for any number

I'm sure it should be possible to do using one line of code - but I'm just not sure where to start!

Thanks

No comments posted yet

Your Answer:

Login to answer
255 Like 38 Dislike
Previous forums Next forums
Other forums

A rank users order by points
I want to make an insert from table 'rank' , with number (rank) from the cod blow, to fild users.ran

records between 2 dates
Hello all,

I have a date tracked table which contains effective_start_date and effective

Check before inserting in DB ???
This is my code
---------------
if ( $_POST ['Submit'])
{{
$username = $_POST ['usernm

Can I use a loop
Hi buddies!

Once again with my doubts here.

Right now I am using this sql stat

Map.php
I am a complete beginner to PHP and am looking for some help with a program I am messing around with

Help with syntax
Hi all!

The $bridge variable is not getting passed while it is contained in the line below:

quick question about System Change Number(SCN) in FlashBack Query topic
i know tht we can get the SCN of the database using flashback concept as follows

SQL>

Any Good MMORPGs you've played?
I'm about to have ALOT of free time on my hands (finished highschool) and I need something to fill t

SAP Logon Failed
I tried to login to SAP through MMC.

When i click start and give password.

it

Remove letter from numeric textbox
I have a textbox that will search the employee database by entering in the employee ID and it will r

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash