4

deletion of the letter followed by three of the four digits in php

 2 years ago
source link: https://www.codesd.com/item/deletion-of-the-letter-followed-by-three-of-the-four-digits-in-php.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

deletion of the letter followed by three of the four digits in php

advertisements

I'm trying to remove part of string in my php script. The strings will be similar to this one: Samsung I8730 Galaxy Express

I need to remove part "I8730", this will be used on other models like "i9500", "B2100", etc. etc.

Please assist with some preg_replace pattern or something that will fix this problem.

Thanks.


A letter is [A-Za-z]. A number is \d.

/[A-Za-z]\d{3,4}/

Related Articles

How to match a uppercase letter followed by the corresponding lowercase letter?

I have a requirement that says a name must not start with 3 identical letters ignoring their case. A name starts with an upper case letter followed by lower case letters. Basically I could convert the whole name to upper case and then match with a re

Delete from the statement using aggregates in the HAVING SQL Server 2008 clause

I have a table that looks like the following where what should be a unique identifier,drg, is not, so I started on the personal challenge of fixing it. I could do this easily a myriad of ways but I'm trying to do some things in a different fashion to

Why does git rebase delete a file added in the last commit if it was deleted by the rebase branch?

I'm trying to figure out why git rebase causes a newly created file to be deleted if the branch I'm rebasing off of deleted it. For example: A1 - A2 - A3 \ B1 A2 = add a new file test.txt A3 = delete test.txt B1 = add the exact same file as A2 If B1

how to delete the specified line from the html table and also in the mysql table using php

I am currently displaying the data using a html table in php from mysql database, and i also i am allowing the user to delete only their own data from the table,my problem is how to match the delete button with the respected row,when user clicks the

Checkbox Deletion - If the declaration in the For loop deletes the bad entries

I have a page which displays my database information. Through each loop, there is a checkbox printed that is to delete the associated entry if checked and submitted. The checkbox names are 'delete[]' and there is the hidden value which contains the r

Regular expression lowercase letter followed by a number

I'm trying to get the hang of regular expression. I'm scanning through an xml file and I want to do is find any word starting with a lowercase letter fallowed by a number e.g. c1234I assume it's something like [a-z 0-9] but it's finding single charac

How do I delete all the e-mail not in the important or sent folder?

There are many emails in my All mailbox more than there are in the Important and Sent mailboxes. I want to remove all the mails which are not in the Important or Sent mailbox. I can not do any of the following steps 1) Delete all the emails in the Al

Method in the administration tool deleting all the contents of the file

I created a user tool that will allow admins of a forum to add, edit, and delete users from their desktop, then give them the ability to upload a file into their database. I'm aware that this should be done straight to a database, but the people I'm

The pruning branches have been deleted in the upstream Git account but still exist in my range

I created a fork of a git repo on BitBucket (let's call it fork_origin). Now the upstream repository (let's call it upstream_origin) has had numerous branches merged into it's master and deleted. So running git fetch --prune upstream_origin deleted l

Cascading Deletion in the Gaming Frame - How to Model Entities

While creating an online shop application using play-1.2.4 ,I ran into some problems with jpa..I wanted to provide an admin area using the CRUD module in play.Here ,an admin user can create/edit or delete the entities in the application(like Customer

Leave only the new NN entries and delete all the rest

I have the following structure. Each user has his own data. ---+ root_child | +---+ Gy7FXRbRjDfAKWu7a95NgiGIZUk1 (Firebase User Id) | | +---+ KlNlb71qtQUXIGA4cNa (random key, generated by Firebase) | | | +--- timestamp = 1234567890 | | | +--- (other

Python regular expression r prefix followed by three single quotes (or double)

What does r prefix followed by three single (or double) quotes, namely r''' ''', mean in Python? And when to use it? Could you explain further the following examples? foo = r'''foo''' punctuation = r'''['"".?!,:;]''' Related SO posts: The differ

Git: find & ldquo; file delete & rdquo; the operations

How can I programmatically detect when a file has been deleted in git? Context: A periodic program generates a text file and checks it in. Occasionally the program failed and did not generate a file. Git, when executed, would check in the results, "d

Is an object pointer in a vector deleted if I call delete on the object?

Recently, I was confused on why I continuously was faced with a segmentation fault trying to access an element in a vector of pointers of certain objects. I didn't manage to resolve the issue, but I suspect that it is because after I pushed the objec

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK