Hi I wish to match any string, in a table, that starts with "NBC" and ends with "L". such as NBC62-L,NBCkhs-24L, etc. Any characters are allowed in between. I have come up with: REGEXP ^NBC+L$ is this correct? I know how to use OR but don't know how to use and. Also can you tell me which command to use to display the data before I actually do the alteration to the MYSQL table, just to test that the correct fields in the table are selected. Many thanks for your help
I don't think you need regex for that. You should be able use LIKE 'NBC%L' where % matches any character any number of times.