I have a table in MySQL with this data in it
I want to get rows with "1" in column row1 using regex. How can I do it?
([^,]1/)
I use this regex, but it only returns rows with "1" in the first comma
You can use the FIND_IN_SET () mysql function
select * from my_table where FIND_IN_SET('1',row1) > 0
Try:
select * from tbl where row1 REGEXP '(^|,)1(,|$)'
(^|,)1(,|$) means (either begenning , or , ) 1 (either begenning or end )sql script demonstration
(^|,)1(,|$)
begenning
,
end
Source: https://habr.com/ru/post/1238068/More articles:git checkout: detailed meaning of "their" and "ours" - gitHow to create an iOS extension for contacts - iosQuickly extract frames from a webcam: C ++ and OpenCV vs Matlab - c ++The difference between a scraper, a caterpillar and a spider in the context of Scrapy - web-crawlerRails - How to get file path (not url) for assets? - ruby | fooobar.comGetting error when transferring files from ec2 to s3 using boto - pythonMySQL selects a row of a column with LIKE or REGEX based on a delimited substring - sqlphp convert page to pdf download with id - phpBefore performing an action in Laravel 5.1 - phpProviding JDK version for maven goals and options - sonarqubeAll Articles