Jump to content

[SOLVED] New to regex


kts

Recommended Posts

Hi, I'm trying to cut a string. I have anywhere from 1 to 10 #s then " - " then item name.

 

I am trying to just cut the number from the beginning. I was using the trim functions and such, but it is a very bad practice. I was told you can accomplish this mostly error free in regex? I tried [0-9], but it only grabbed one digit.

Link to comment
https://forums.phpfreaks.com/topic/142113-solved-new-to-regex/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.