A
A
Albert Kazan2018-02-10 11:45:18
PHP
Albert Kazan, 2018-02-10 11:45:18

Regular expressions. How to highlight the file name?

I don't understand anything about these expressions at all, so I'm asking for help
Here is the code

preg_match("%\www(.*?).php$%" ,__FILE__, $matchedUnit);

I only achieved that it outputs like this:
Array
(
    [0] => www\header-template.php
    [1] => \header-template
)

And I need it to display header_template.php

Answer the question

In order to leave comments, you need to log in

12 answer(s)
D
Dmitry, 2018-02-10
@Farrien

Good morning.
And what for to you in the given situation regular expressions?
There is pathinfo() .
And then there is basename() .
ps If it is possible not to use regular expressions - do not use.
ps Well, if you are really impatient, then here, try to start with this .

S
systemiv, 2012-03-18
@systemiv

Recently acquired a keyboard:
image
Honestly, it is divine. Face facts:

  • It is quiet, the keystrokes are clear
  • Has a removable rubber layer (I personally eat and all, and then I just blow off the crumbs)
  • Low landing of the keys, which is extremely convenient for me

Before that I tried a lot of keyboards, this keyboard is simply the leader of all! My advice, take it and don't even think about it!
Oklick 555S

I
igorakintev, 2012-03-19
@igorakintev

shop.key.ru/shop/goods/39588
Keyboard Apple Keyboard with Numeric Keypad
I use it at the moment, I like it very much

H
Hint, 2012-03-18
@Hint

Logitech Illuminated Keyboard?
market.yandex.ru/model.xml?modelid=3545159&hid=723088

W
Wott, 2012-03-18
@Wott

I've been using BTC lately. I choose simply - I come to a normal store where there are claves and many different ones and touch until I like it. I liked BTC 6300, but I uploaded it and it died. Now 6301 (a little worse and noisier, but also nothing).

I
ilyuxa, 2012-03-20
@ilyuxa

market.yandex.ru/model-spec.xml?modelid=716378&hid=723088 I
idolize her for the scroll wheel under her left hand. it's something.

K
Killy, 2012-03-18
@Killy

Oklick 420 M
Media-tech MT1240W-RU
BTC 6311U-BL / 6310U-BL
A4Tech KV-300H / KD-600
Chicony KU-0833 / KU-0902 / KU-0837-BL / KU-0950-BL
All within 1000r. like.
I don't know about volume. Judging by the reviews, A4Tech can be excluded for its loudness.
Oklick 420 M seen live. A good thing, apart from the strange layout.
I'm looking at Chicony KU-0837-BL myself. I respect the brand and the layout is perfect (for me).

I
Ilya Malanin, 2012-03-18
@malanin

Not exactly thin buttons, but I would like to recommend a good keyboard: Microsoft Natural Ergonomic Keyboard 4000, ~$50
www.microsoft.com/hardware/en-us/p/natural-ergonomic-keyboard-4000/B2M-00012

L
lemark, 2012-03-18
@lemark

Really like. Backlighting at night is useful, even considering touch typing.
Not slim, but the buttons are quite spaced and there have never been problems with false clicks.
market.yandex.ru/model.xml?modelid=6176305&hid=723088&show-uid=729240813320963651

R
Riateche, 2012-03-19
@Riateche

I had a BTC 6310U, the keyboard is comfortable and solid. I still play it in Guilty Gear, and this is a good stress test for a keyboard. I advise you to choose BTC.

O
Ogra, 2012-03-19
@Ogra

microsoft comfort curve 2000
If you find it, it looks like this model is no longer produced.

K
kush_xD, 2017-08-01
@kush_xD

I, too, have been looking for a keyboard with the same criteria for quite a long time, I didn’t have enough money for all kinds of Razer, I stumbled upon the esdevice.ru online store where I found the COUGAR VANTAR keyboard, the price completely suited me especially compared to Razer, the keyboard fully fits all the criteria you listed , I am completely satisfied with the keyboard, the store, too, quickly delivered a quality product.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question