Lrnmore - I don't have to test for the prefix it could be any prefix but the ending number combo AA_BB-CC_DD-xx-xx (could be any number of digits really) needs to be have the - replaced with ^.. The ending number combo will always be preceded with an alpha character.. your script seems to do the...
thanks very much. I was having a lot of trouble with the preg_replace.. not sure I understand the statements now.. but they work great. Thanks very much.
I need a little help. I need to substitute a ^ for a - but only in certain instances. This is an example I need a fix for - for the string 'abcd-efgh_zzzz_xxxx-1-99' I only need to replace the - if the hyphen is located next to a number. So in the example the correct result should be...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.