MATLAB: Find the matching strings in tables

string matchtable

Hi,
I have an excel file and I converted to a table. My table has a column called "Locations". The location column contains a long list of string like " Country1-Area1,CityA-52". I would like to rename the sites as follows: Area1,CityA-52. I tried many things to find the first "-" index number in a table. I thought if I find the first index number then I could read the rest of the string. Could not succeed so far. Since it is a table it is more complicated. Any ideas?
Thank you Birsen

Best Answer

YourTable.Locations = regexprep( YourTable.Locations, '^[^-]+-', '', 'lineanchors');