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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.