Help with RegExp (?)
How to remove from string all ^x, where x is digit from 0 to 8 ?
Example: ^1P^8layer^0 -> Player |
Re: Help with RegExp (?)
\^[0-8] is the pattern
but amxx doesn't have regex_replace_all, and such simple case doesn't need to use regex. Code:
void main() |
Re: Help with RegExp (?)
Quote:
So, now I have: PHP Code:
|
Re: Help with RegExp (?)
Don't you find any useful info from that example ? If so, sorry for wasting your time.
|
Re: Help with RegExp (?)
jim_yang, thanks a lot! But I don't know which one is more effective.
|
Re: Help with RegExp (?)
It's not that hard to figure out. See the content of replace_all, see the content of his function. Now, when you see replace_all does much things by calling severals natives and you want to call it 9 times, vs the simple Jim's function called one time without calling natives ; it should be obvious, isn't it ?
|
| All times are GMT -4. The time now is 08:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.