How can I capture a comment? #472
-
/**
* It's a comment
*/
|
Beta Was this translation helpful? Give feedback.
Answered by
HerringtonDarkholme
Jun 25, 2023
Replies: 1 comment
-
You can first use
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
couriourc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can first use
kind: comment
and then use regular expression.ast-grep
has a--json
flag.https://ast-grep.github.io/playground.html#eyJtb2RlIjoiQ29uZmlnIiwibGFuZyI6ImphdmFzY3JpcHQiLCJxdWVyeSI6ImNvbnNvbGUubG9nKCRNQVRDSCkiLCJyZXdyaXRlIjoibG9nZ2VyLmxvZygkTUFUQ0gpIiwiY29uZmlnIjoicnVsZTpcbiAga2luZDogY29tbWVudFxuICBwYXR0ZXJuOiAkQSIsInNvdXJjZSI6Ii8qKlxuKiBJdCdzIGEgY29tbWVudFxuKi8ifQ==