Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

wild card search key for php

Featured Replies

I have been trying to find the wild card search key for php.

Remember back in dose if you did a dir images*.jpg, it would return all files named imagesXX.jpg

I need to do something similar in php.

Anyone know what the wild card is?

that would be so helpful. how about wild cards like when you start typing a word in and before you finish typing it, results are already showing up.

like if you want to type "car" and youve only typed in "ca" so for, it would show "cat, car, cap, etc..."

The wildcard in Regular Expression (used in functions like preg_match or preg_replace) would be a simple 'period'.

Lets say you're seraching inside 'My dog is a lazy dog';

'.' = Matches any single character

Would match 'M'

'.*' = Matches everything till the very end (greedy)

Would match 'My dog is a lazy dog' (since no other match at end was indicated).

However...

'.*g' Would match 'My dog is a lazy dog' Since 'g' is the very last end match.

'.*?' = Matches till it hits the first match (lazy)

Would match 'My dog is a lazy dog' (since no other match at end was indicated).

However...

'.*?g' Would match 'My dog' due to 'g' being the first match of 'g'

To further note:

following a wildcard/match query with '*' means infinite matches till the end

following a wildcard/match query with '?' means match till the first matching text

following a wildcard/match query with '+' means it must match one or more times

If this wasn't very clear - the php manual has more info regarding regular expressions.

http://php.net/regex

As well as these other sites:

http://weblogtoolscollection.com/regex/regex.php

http://www.regular-expressions.info/php.html

Edited by Chozo4

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.