Jump to content

HeLp?


Eugene

Recommended Posts

Hey all, I need a regular expression, and seeing as my regexbuddy demo expired, anyone have any other regex application?

Also the regex i need is it has to match a specific word.

For example...

preg_match_all('/'.$string.'/', 'whatever', 'whatever', ...);

Instead of matching that particular word, I need it to also match 50 characters after that word. If there aren't 50 character it matches whatever is there.

Thanks.
Link to comment
https://forums.phpfreaks.com/topic/16971-help/
Share on other sites

[quote author=G__F__D link=topic=103505.msg412149#msg412149 date=1155083548]
[quote author=ToonMariner link=topic=103505.msg412140#msg412140 date=1155082297]
preg_match_all('/' . $string . '.{0,50}/',......
[/quote]

I'll try that.

Edit: It does work, sorry :$.
[/quote]How can I also match [i]UP TO[/i] 50 characters before that.
Link to comment
https://forums.phpfreaks.com/topic/16971-help/#findComment-71724
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.