hi. my problem is i forgot how to embed code in regex and for this particular problem i am now clueless
i couldn't do it even after i searched a lot today for hours. i want to count some characters in a string. then after a threshold, i want to save the place. for example; let my string be: "abacdbccdee". i want to count total of 3, c's and b's. (order or how many of each one is not important) so at 6th place, i count 2b's and 1c. only thing i want in this puzzle is 6
i can do it if i split string into array but if i dont remember wrong, regular expression is more efficient. and this my another concern, considering i will search big strings, is there a way to stop regular expression after i found the place. no need to look for rest
thank you in advance
In reply to a regular expression problem by siskos1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |