
Small php function
5228
$50
- Posted:
- Proposals: 1
- Remote
- #122738
- Archived
Description
Experience Level: Intermediate
I need a function to search for a certain string with content inside of it, and replace the entire sting with something else.
For example: text text BC=32A2234 text text text.
Then the entire "BC=32A2234" should be replaced with something. The length after the part "BC=" might vary. There might also be more than one occurance per string.
The function should be something like:
bc_search($string), where $string is input text.
The function should be used like:
$replacement_string = bc_search($string);
I can write the part where the occurance is replaced myself. You must store the part after "BC=" in a variable inside of the function, so its easy for me to do that part.
Code needs to be commented in english and easily understandable.
For example: text text BC=32A2234 text text text.
Then the entire "BC=32A2234" should be replaced with something. The length after the part "BC=" might vary. There might also be more than one occurance per string.
The function should be something like:
bc_search($string), where $string is input text.
The function should be used like:
$replacement_string = bc_search($string);
I can write the part where the occurance is replaced myself. You must store the part after "BC=" in a variable inside of the function, so its easy for me to do that part.
Code needs to be commented in english and easily understandable.
Cato L.
0% (0)Projects Completed
6
Freelancers worked with
6
Projects awarded
50%
Last project
7 Apr 2014
Norway
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies