Back
5 mins read

PPC Bee RegExps - So Called Miracles with Regular Expressions

One of the most powerful features which you can use in PPC Bee, are Regular Expressions, abbreviated RegExp.
By
Michaela Zákopčaníková
| Mar 10, 2016
What are Regular Expressions?

A Regular Expression is a combination of characters that maps patterns in the text and allows their search or replacement. Its most fundamental application is similar to the “Find and Replace” function that you know well e.g. from MS Excel. However, RegExps can do much more!

They are interesting for us because with RegExps we can easily go for example through XML feeds with e-shop products.

Why to use them and what for?

If you manage large PPC campaigns, you deal with large amounts of data. Editing them using RegExps is much easier. They can, for example, remove all the text in brackets, and much more.

Perhaps your product titles contain “free gift included”? However, you probably don’t need this in your keyword. Thanks to the regular expression, there is no problem to delete this phrase in the entire campaign.

A simple example of how to use a RegExp

We know that for certain products it is worth having color in the campaigns in English too. Especially in technology, such as smartphones or gaming consoles. In essence, this means creating another set of key phrases with the replaced expression.

In our example let’s select black. All Czech forms of this word: “černá”, “černý” and “černé”, can be found in the text using a RegExp: čern(á|ý|é) 
(in brackets you can see different ways of ends).

This is how the substitution of Czech forms of black for the English word “black” in the PPC Bee looks like.

https://blogadmin.ppcbee.com/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBbWdDIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--a4ab26faa044fd23cb84cfe4c5e29d8a17884b5b/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9VY21WemFYcGxYM1J2WDJ4cGJXbDBXd2RwQWxnQ2FRT2doZ0U9IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--b1b529f8dfa4cfc5545b605b986d2f12cc3d32fa/0-0*0PFTOaaHusyjG-rm.pnghttps://blogadmin.ppcbee.com/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBbWdDIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--a4ab26faa044fd23cb84cfe4c5e29d8a17884b5b/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9VY21WemFYcGxYM1J2WDJ4cGJXbDBXd2RwQXJBRWFRT2doZ0U9IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--21b5f9fec4a1a26d9fca8e4bc575ac97c48ec932/0-0*0PFTOaaHusyjG-rm.png



The result is that the product “iPhone černý 16 GB” creates the key phrase “iPhone black 16 GB” as well.
This can be done easily otherwise too. But, for example, the \(.*\) RegExp can select all the text in brackets, a difficult action without this RegExp. When creating keywords from the feed, this is an invaluable aid.

RegExps for immediate use


We tried to select a few regulars that might be useful for you. They are divided according to fields common among our clients. You can use them, for example, to find any text that is not suitable for the ads or keywords for any reason, remove it, or replace it with another.
  • General
  • Cars
  • all the text in brackets
    \(.*\)
  • all the text following a space and dash/plus sign
    \s[-\+].*
  • dash at the end of the line
    \s[-]$
  • mix of letters and numbers (in most of cases)
    \b((?=[A-Za-z-\/]{0,19}\d)[A-Za-z0-9\/-]{4,20})\b
  • primary colors\b(black|white|grey|red|green|blue|silver|gold|brown|yellow|orange|pink|purple)
  • volume, length, pieces (liters, decimeters, 20 pcs, etc.)
    \b[\d+\.,]+\s?(hl|dl|ml|l|km|dm|cm|mm|m|pcs|yard|mile)\b
  • punctuation
    [\.\-,;:"_'!\?\/\\\=\+\(\)\*\#\$\~\^\&\@<>\[\]\{\}]
  • sizes for clothing (XXXL)
    \b(size\.\s*)?X{0,3}(M|S|L)\b
  • country codes used for different size labelings (EUR size) size\s(UK|US|EU|EUR)\s*\d+
  • memory (16 GB)
    \b\d+\s?(mb|gb|tb)\b
  • clock rate (1.5 GHz)
    \b[\d+\.,]+\s?(m|g|k)hz\b
  • digital camera resolution (10.5 MPx)
    \b[\d+\.,]+\s?mpi?x\b
  • anything following the engine displacement (1.6 MPI Elegance)
    \d+[\.,]\d+\s?(tdi|tsi|mpi|spi|msi).*

In order to delete the phrase, just copy one of the above, paste it into the substitution feature and leave the other part empty.

Anything more?


For more information about how to create your own RegExps, see: http://regexone.com/

Before using them in PPC Bee, always try your RegExps first! For testing we recommend: http://rubular.com/

For another helping with RegExps, you can also use the website: http://regexr.com/

Once you get comfortable with the RegExps, you will come across other possible applications at each click.

If you want to know more about the use of RegExps in PPC Bee, please contact us.

Michaela Zákopčaníková
Editor of PPC Bee
Start your 30-day free trial
Cancel anytime. No credit card required
Sign up with Google account
Or use your email
You're already signed in
Jump into PPC Bee

Related articles

Read more

Capitalization in Ads

In the past, PPC Bee automatically changed your capitalized words. Because of them your ads can be rejected (primarily by AdWords). There are, however, several clients whose brand name is comprised of uppercase letters, and there was no way for them to keep this in their ads. Thus we have decided to meet their needs and now we have enabled capitalized words in ads.

By Michaela ZákopčaníkováSep 5, 2017 | 1 min read

Read more

Automate and win!

With PPC Bee, every information your data feed contains can be automated. Either you want to make sure that only ads for products in stock are running, or create keywords or ad texts. And since we are very curious about your approach to automation, and to what extent you make use of it, we decided to organize a competition!

By Michaela ZákopčaníkováAug 3, 2020 | 3 mins read

Read more

PPC Bee reveals Image Editor in Facebook’s dynamic product ads

PPC Bee has enhanced Google Ads, Sklik, and Microsoft Advertising (formerly Bing) with the option to create dynamic product ads on Facebook.

By Petra PacákováJul 9, 2020 | 4 mins read