# New to regex [closed]

I am new to using regular expressions in LibreOffice Calc. What I am trying to figure out how to do is the following I have a list of various titles and one of the columns has "Regions Released", some of the contents of that column has a few different entries. "NA, JP, PAL, BR" etc. What I was wondering how to do is I want to take that content and have it create a new column for each of those.

I have took a small section of the tables and did a example of how I would like it to look finished.

in the above image You can see the first row is the titles for the columns, the next row starts the data. If the title was released in the region I would like it to mark an yes into the new columns. Looking at the F3 field you can see it says NA and nothing else. So the NA column would get a Yes while the others are left blank.

Would this type of thing be able to be done using Regex? I am currently doing it all by hand and some of the lists I have are for 400+ rows and would very much prefer a quicker way to do it all.

Thanks

James

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2016-03-17 21:00:14.158678

Sort by » oldest newest most voted

Hi lwizardl

There's no need to use a regex for that task. Use one of these as your function (this is for the NA column; change other columns as appropriate):

• =IF(ISNUMBER(FIND("NA", $A2)), "YES", "") (case-sensitive) • =IF(ISNUMBER(SEARCH("NA",$A2)), "YES", "") (case-insensitive)

demo-calc.ods